Home  >  Article  >  Backend Development  >  Redirect jumps to external links of the website, redirect jumps to the website_PHP tutorial

Redirect jumps to external links of the website, redirect jumps to the website_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 09:44:301368browse

Redirect jumps to external links of the website, and redirect jumps to the website

In the comment function of Emlog, the commenter can fill in his or her website address. But many times we don’t want our website to have too many cluttered external links. Of course, we can add the nofollow attribute to the link. That is, the original link code is

All the way

When we add the rel="nofollow" attribute to this link, we tell the search engine not to pass the weight of this link address. Shape like:

All the way

And here, what I share with you along the way is to redirect the external link address. That is, if the external link address is http://www.100sucai.com, through redirection, it becomes http://your website address/go.php?url=http://www.100sucai.com and it is still accessed Target website http://www.100sucai.com

First download the go.zip file unzip the go.php file and upload it to the root directory of your website, then add http://www.100sucai in go.php Replace .com with your website address. Finally, you only need to replace the link address you want to convert from

Replace it with:

You can complete the redirection conversion of the URL link of the Emlog blog commenter. Furthermore, you can also open robot.txt in the following directory and add the following code to prevent redirected external links from being indexed by search engines! : Disallow: /go.php?url=*

Supplementary instructions: Open go.php, you can also set whether to jump directly. If $directGo is set to false, a frame will be used to load the external link web page.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1048759.htmlTechArticle redirects external links to the website. The redirection of the website is in the comment function of Emlog. The commenter You can fill in your own website address. But many times we don’t want our website to...