Home > CMS Tutorial > WordPress > How to redirect external links in wordpress

How to redirect external links in wordpress

Release: 2019-07-23 15:13:47
Original
4635 people have browsed it

How to redirect external links in wordpress

When we write articles, we may inevitably encounter times when we need to jump to external links, but jumping directly to external links may be demoted by search engines. What should we do? ? So here are two very simple external link jump methods to solve this problem.

1. Open Editplus and create a new PHP file, copy and paste the following code, then save it as go.php and upload it to the root directory of the website

Then the jump format is: {this site address} /go.php?url={External link address}, for example:

//m.sbmmt.com/go.php?url=https://www.baidu.com/

2. Open Editplus and create a new PHP file, copy and paste the following code, then save it as go.php and upload it to the root directory of the website.
The resulting form is {this site address}/go.php?{external link address}. Compared with the first one, the url= is removed and is slightly shorter.

Note: Finally, don’t forget to add: Disallow: /go.php? to the robots.txt file to prevent search engines from crawling go.php, otherwise it will have no effect.

For more wordpress related technical articles, please visit the wordpress tutorial column to learn!

The above is the detailed content of How to redirect external links in wordpress. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template