【问题标题】:Htaccess ReWrite entire from tags to tagHtaccess 重写整个从标签到标签
【发布时间】:2016-09-16 19:07:40
【问题描述】:

我的 wordpress wordpress 网站出错了,有很多页面要去

  • www.mysite.com/tags/the-tag

什么时候应该

  • www.mysite.com/tag/the-tag

我尝试了以下方法但无济于事:

            RewriteBase /
            RewriteRule ^tags/(.*)$ /tag/$1 [L,R=301]

大家有什么想法

【问题讨论】:

  • 去掉开头的^
  • 不,仍然没有运气
  • 显示您的完整 .htaccess 文件,包括您的 wordpress 规则。
  • 确保上面的 301 规则正好在 RewriteEngine On 线下面

标签: .htaccess redirect apache2.4


【解决方案1】:

我想你忘了打开引擎

 RewriteEngine on
            RewriteBase /
            RewriteRule ^tags/(.*)$ /tag/$1 [L,R=301]

【讨论】:

  • 你能简单解释一下到底发生了什么吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-08-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-05-07
相关资源
最近更新 更多