How to redirect external links in wordpress
Jul 13, 2019 pm 02:19 PMWhen 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:
https://www.php.cn/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!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The 5 Best IDEs for WordPress Development (And Why)

Create WordPress Plugins With OOP Techniques

How to Pass PHP Data and Strings to JavaScript in WordPress

How to Embed and Protect PDF Files With a WordPress Plugin
