wordpress 重定向_如何跟踪404页面并在WordPress中重定向它们

wordpress 重定向

It can be a challenge to move your website from one location to another if you don’t know what to do with your links. Just recently we talked about how you can update your URLs using the Velvet Blues Plugin for WordPress. But what if people try to access a page on your site through your old URL? Today we are going to show you how to redirect broken URLs to your new URL. The best part about is that you don’t have to know anything about your .htaccess file. Redirection is a WordPress plugin that manages 301 redirections, keep track of 404 errors, and generally tidy up any loose ends your site may have.

如果您不知道如何处理链接,将网站从一个位置移动到另一个位置可能是一个挑战。 就在最近,我们谈到了如何使用适用于WordPressVelvet Blues插件更新URL。 但是,如果人们尝试通过您的旧URL访问您网站上的页面怎么办? 今天,我们将向您展示如何将损坏的URL重定向到您的新URL。 最好的部分是您不必了解.htaccess文件。 重定向是一个WordPress插件,可管理301重定向,跟踪404错误,并且通常会整理您的网站可能存在的任何松散结局。

影片教学 (Video Tutorial)

演示地址

If you don’t like the video or need more instructions, then continue reading.

如果您不喜欢该视频或需要更多说明,请继续阅读。

First thing you need to do is install and activate Redirection plugin. Upon activation, go to Tools » Redirection to set up your redirects.

您需要做的第一件事是安装并激活重定向插件。 激活后,转到工具»重定向以设置重定向。

Adding a new redirect in WordPress with Redirection plugin

Under the add new redirect section simply add the old URL which is showing 404 and a new URL where users will be redirected.

在“添加新的重定向”部分下,只需添加显示404的旧URL和将重定向用户的新URL。

For beginners, this simple screen can look confusing. Let us explain. The match dropdown has a few options. URL only, URL and referrer, URL and useragent, and URL and login status.

对于初学者来说,这个简单的屏幕看起来令人困惑。 让我们解释一下。 比赛下拉菜单有几个选项。 仅URL,URL和引荐来源网址,URL和用户代理以及URL和登录状态。

In most cases, you want to use URL and referrer. Mainly because if you are seeing a number of 404 requests for a specific page, it is not users typing your URL in. It has to be someone who is linking to it.

在大多数情况下,您想使用URL和引荐来源网址。 主要是因为如果您看到特定页面的404请求,则不是用户输入您的URL。它必须是链接到该页面的人。

So now whenever someone else links to the broken URL (or a post that you moved), it automatically redirects them to the new location. So use URL and referrer option for that.

因此,现在只要有人链接到断开的URL(或您移动的帖子),它就会自动将其重定向到新位置。 因此,请使用URL和Referrer选项。

Your action should always be Redirect to URL, unless you know what you are doing.

除非您知道自己在做什么,否则您的操作应始终为“重定向到URL”。

After you have entered this information hit “add redirection”. Go to the new URL to test and make sure that it works.

输入此信息后,单击“添加重定向”。 转到新的URL进行测试,并确保它可以工作。

Redirection plugin also has the option to track 404s. Simply click on the 404s link at the top and plugin will show you recent 404 errors occurred on your site since you installed the plugin.

重定向插件还可以选择跟踪404。 只需单击顶部的404s链接,插件就会显示自您安装插件以来,您的网站上最近发生的404错误。

Track 404 errors in WordPress with Redirection plugin

You can take a look at the ones and determine what to do about them. For example, someone might be linking to your older post that you no longer have. You can redirect those to another location. All you have to do is click the ‘Add redirection’ link below the date of that log entry.

您可以查看其中的内容并确定如何处理它们。 例如,某人可能链接到您不再拥有的较旧的帖子。 您可以将它们重定向到另一个位置。 您所要做的就是单击该日志条目日期下方的“添加重定向”链接。

These logs will also reveal how people are trying to attack your site. We get tons of 404 inquiries from bots that are trying to try every single theme with timthumb infection. Hoping that they will find something (they won’t). But it’s interesting to see all the IPs that are trying things.

这些日志还将显示人们如何尝试攻击您的网站。 僵尸程序尝试尝试每个带有timthumb感染的主题时,我们都会收到大量的404查询。 希望他们会发现一些东西(他们不会)。 但是有趣的是看到所有正在尝试的IP。

This plugin also handles redirection for your modified posts. If you modified your post’s URL, then this plugin sets up an automatic redirect. It is one of the MUST have plugins for any serious bloggers.

该插件还可以处理您修改后的帖子的重定向。 如果您修改了帖子的URL,则此插件将设置自动重定向。 对于任何严肃的博客作者来说,它都是必须具有的插件之一。

We hope this article helped you learn how to track 404 pages and redirect them in WordPress. You may also want to see our guide on how to fix WordPress posts returning 404 error.

我们希望本文能帮助您学习如何跟踪404页面并在WordPress中重定向它们。 您可能还想查看有关如何修复返回404错误的WordPress帖子的指南。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-track-404-pages-and-redirect-them-in-wordpress/

wordpress 重定向

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
当博客进行改版或域名迁移时,相关的链接结构发生改变,你是否遇到过404错误,如果你还为这个而烦恼的话,那么,今天介绍的这款插件,可以帮你解决死链问题,进而保护你的访客和PR。 Redirection是一个管理301重定向wordpress插件,可以将404 errors重定向到正确的页面,插件特征 •支持WordPress、Apache重定向 •404 error 监测 - 抓取404 errors页面,让你轻松重定向到新页面,而不致于丢失流量 •支持RSS feed 404 errors 重定向 •可自定义重定向路径,你可以重定向一个网址到另一页面、文件或网站。 •支持整个网站或目录重定向 •可创建基于URL、浏览器、推介网址、或注册页面的重定向(这对于隐藏网上赚钱的推介链接非常有用) •当一篇日志URL改变时,可以自动添加301重定向 •可以输出重定向到CSV, XML或Apache .htaccess文件 •支持正则表达式 Redirection插件安装 1.下载Redirection插件,然后上传插件到/wp-content/plugins/下的文件夹。 2.到wp管理后台插件页面激活插件,激活插件后,你可以点击Tools"--->"Redirection",看到如下页面 注意,我建议您在原始URL的末尾加上(.*),并开启正则表达式匹配。这样可以匹配上所有以你的URL为前缀的页面,防止在指向某条评论的URL上出现问题。 404错误重定向 开启404监视功能,需要到“Modules”页面,编辑“404 Errors”模块,保证“记录404错误”是选状态,如下图: 点击“404 Errors”模块的“点击数”一列的数字,即可浏览404错误日志,甚至可以选择RSS链接,得到所有404错误的RSS Feed地址。 注意:很多的攻击行为,也产生大量的404错误。在攻击行为频繁的时期开启404监视,可能会降低网站的效率。 分组功能 可以根据用途的不同,对你的转向记录进行分组。在“分组”页面增删分组,然后在“转向”页面,选择列表下方的“移动到:”选项,即可移动选的转向记录。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值