Wordpress 新页面重定向到旧的 404 页面 [英] Wordpress new page redirects to old 404 page

查看:60
本文介绍了Wordpress 新页面重定向到旧的 404 页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Wordpress 中遇到了这个奇怪的问题.如果我创建一个页面,例如 Lead 带有一个 slug lead,因此 url http://example.com/lead.如果我在浏览器中输入 url http://example.com/lead,它最终会被重定向到 http://example.com/learning/program/lead

I have this strange problem in Wordpress. If I create a page such as Lead with a slug lead and therefore url http://example.com/lead. If I enter the url http://example.com/lead into the browser it ends up being redirected to http://example.com/learning/program/lead

我试图用;

remove_filter('template_redirect', 'redirect_canonical');

但这似乎不起作用.即使两个页面都不存在,我最终还是得到了;http://example.com/learning/program/lead

But that does not seem to work. Even when both pages don't exist I end up with; http://example.com/learning/program/lead

推荐答案

我认为您已经安装了任何重定向插件并设置了重定向,否则为 301 重定向.

I think you have installed any redirect plugin and set redirection otherwise 301 redirect.

这篇关于Wordpress 新页面重定向到旧的 404 页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆