The original station a lot of articles are excerpts of the external article, the article many links are either time has expired, or is some of the test URL, such as: http://localhost/, such as, link more words, the formation of a lot of dead links, this SEO optimization is very unfavorable. Then you need to filter the content within the site and add the rel= "nofollow" attribute to the link that is not an internal link.
The web found the WordPress filter external link function, change it can be used
External links Add nofllow $content content $domain current site domain function content_nofollow ($content, $domain) {preg_match_all ('/href= ' (. *) ") /', $content, $matches); if ($matches) {foreach ($matches [1] as $val) {if (Strpos ($val, $domain) ===false) $content =str_replace (' href= "'. $val. '" , ' href= '. $val. ' "rel=" external nofollow "', $content); }} preg_match_all ('/src= ' (. *?) ") /', $content, $matches); if ($matches) {foreach ($matches [1] as $val) {if (Strpos ($val, $domain) ===false) $content =str_replace (' src= "'. $val. '", ' src= '. $val. ' "rel=" external nofollow "', $content); }} return $content;} Called when the call is good, the following is a call to the demo $a [' content '] = content_nofollow ($a [' content '], $domain); Add nofllow attributes to the link in the article Content note! Filter the domain name needs to be without "/", such as http://www.ledaokj.com so that can be very good filtering. Text link: Increase the filtering of external links to site content
http://www.bkjia.com/PHPjc/764698.html www.bkjia.com true http://www.bkjia.com/PHPjc/764698.html techarticle The original station many articles are excerpts of the external article, the article many links are either time has expired, or is some of the test URL, such as: http://localhost/, such as, link ...