Home > Article > Backend Development > Redirect jumps to external links of the website, redirect jumps to the website_PHP tutorial
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
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:
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.