nofollow

给Discuz X论坛帖子的外部链接增加nofollow属性

大兔子大兔子 提交于 2020-03-02 19:27:01
给Discuz X论坛的外部链接增加nofollow方法,测试版本Discuz! X3.1,其它版本未经测试 打开目录source/function/function_discuzcode.php 文件,查找parseurl函数,对照以下代码进行修改: function parseurl($url, $text, $scheme) { global $_G; if(!$url && preg_match("/((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|thunder|qqdl|synacast){1}:\/\/|www\.)[^\[\"']+/i", trim($text), $matches)) { $url = $matches[0]; $length = 65; if(strlen($url) > $length) { $text = substr($url, 0, intval($length * 0.5)).' ... '.substr($url, - intval($length * 0.3)); } $url = nofollow($url); return '<a href="'.(substr(strtolower($url), 0, 4) == 'www.' ? 'http://'.$url :

Prevent URLs form JavaScript array from Google indexation

Deadly 提交于 2020-01-05 07:56:21
问题 I have some adverts on my site. This adverts are images and not closed in <a> tag. I store adverts URLs in JS array advertisement . When user clicks on advert the next JS code executed: $(".jLinkBlank").click(function() { var adverId = parseInt($(this).attr('id').substring(5)); var url = advertisement[adverId]; window.open(url, '_blank'); }); But as I see Google indexing such URLs in any case. How can I prevent such URLs from Google indexation? Solutions like robots.txt or <META NAME="ROBOTS"

Does Google follow Buttons/Inputs

老子叫甜甜 提交于 2019-12-23 09:30:43
问题 Does google follow buttons and form inputs when crawling websites? I'm adding rel="nofollow" tags to links I don't want google to follow but I'm not sure if I need to add them to buttons. For example an 'add to cart' button. Thanks 回答1: Generally, no. Especially not POST-based forms; POST may have side-effects per the RFC, while GET is defined as a "safe" method. Google is experimenting with some "deep web" spidering, however, so it's possible that they may request GET-based forms -- but this

How to use nofollow link in script tag [duplicate]

丶灬走出姿态 提交于 2019-12-14 04:05:34
问题 This question already has an answer here : block search engine crawling directory (1 answer) Closed 2 years ago . This is my script code: <script type="text/javascript" src="//example.com/js/infolinks_main.js"></script> I want to make crawler not to follow or index example.com/js/infolinks_main.js . How can I do this task? I have robots.txt in my root, but that URL is an external URL. NB: I do not want to use iframe . 回答1: The script element can’t have a rel attribute, so nofollow can’t be

Nofollow for the whole page?

笑着哭i 提交于 2019-12-14 02:14:55
问题 Is it possible to add a nofollow for the whole page instead of rel="nofollow" for every link? I've got some profile pages where users can enter their contacts and other stuff which can be potentially spam, and I cba to alter the filters for wysiwyg data. 回答1: Put this meta tag in the head <meta name="robots" content="nofollow" /> Reference links: Using the robots meta tag rel=nofollow The right use of NoFollow tag in site links – SEO Tips 来源: https://stackoverflow.com/questions/12575290

How can I add rel = “nofollow” to a link in CKEditor if it's an external link

梦想的初衷 提交于 2019-12-13 17:13:21
问题 i want to give rel="nofollow" to my external links which its content managed by ckeditor. example.com = my site externallink.com = any external link For example: <p> Lorem <a href="https://example.com/an-article.html">ipsum</a> dolar <a href="http://externallink.com/example.html" rel="nofollow">sit</a> amet. </p> This solution: editor.dataProcessor.htmlFilter.addRules( { elements : { a : function( element ) { if ( !element.attributes.rel ) element.attributes.rel = 'nofollow'; } } }); from

WordPress分页插件WP-PageNavi分页导航nofollow

試著忘記壹切 提交于 2019-12-10 15:54:17
WordPress分页插件 WP-PageNavi (中文名:分页导航)是非常受欢迎的分页插件,并且还支持 WordPress多站点 。但是由于分页带有链接,这和我们提到过的“ 拿到WP官方主题Twenty Ten就是一顿nofollow伺候 ”、“ WordPress阅读全文more-link nofollow ”属于同类问题:不利于网站优化,权重被分离了。 为 WP-PageNavi增加nofollow 的方法:选择插件中的wp-pagenavi/core.php文件,搜索 class='$class' ,在其前面加上 rel='nofollow' 。 注意 rel='nofollow' 、与 class='$class' 之间有空格哦。如果是用的 EditPlus 等编辑器修改的文件,需保持为UTF-8编码,如果是WP后台直接修改的插件代码,则不需要。 来源: oschina 链接: https://my.oschina.net/u/55448/blog/66546

how fetch recent unfollowers from instagram api?

南楼画角 提交于 2019-12-10 15:39:02
问题 justunfollow.com have a system for show recent instagram followers and unfollowers , instagram api just give me followers and following informations but we cant access for relations date info for each user ( follow and un follow ) by instagram api . now my question is , how ustunfollow.com work ? 来源: https://stackoverflow.com/questions/27101918/how-fetch-recent-unfollowers-from-instagram-api

X-Robots noindex specific page in .htaccess

这一生的挚爱 提交于 2019-12-10 04:35:26
问题 Can I 'noindex, follow' a specific page using x robots in .htaccess? I've found some instructions for noindexing types of files, but I can't find instruction to noindex a single page, and what I have tried so far hasn't worked. This is the page I'm looking to noindex: http://www.examplesite.com.au/index.php?route=news/headlines This is what I have tried so far: <FilesMatch "/index.php?route=news/headlines$"> Header set X-Robots-Tag "noindex, follow" </FilesMatch> Thanks for your time. 回答1: It

How to remove rel=“nofollow” from feed page

匆匆过客 提交于 2019-12-09 23:39:04
问题 In this page every link has rel="nofollow" . can you guys please tell me how to remove the nofollow from that page. I am using WordPress them. Hoping to receive some help from your side Thanks in advance 回答1: To remove nofollow from link please add the below code in your current active theme functions.php file. The rss hook not allow to change content within tag, so create custom template for your feed. /** * Deal with the custom RSS templates. */ function my_custom_rss() { if ( 'photos' ===