【问题标题】:Remove special word from end of URLs with htaccess?使用 htaccess 从 URL 末尾删除特殊单词?
【发布时间】:2016-02-27 11:08:25
【问题描述】:

Google 已经创建了 7500 Not Found 404 Error 我发现几乎所有这些都是因为 href 中带有“YourDrible”的按钮(只有 url 字段中的这个词)并且所有页面都有这个按钮所以有 7 k具有此 url 模式的页面:

http://Some-True-URL/YourDribble

有什么方法可以让我在 htaccess 中或某处告诉每个结尾带有“/YourDribble”的 URL 都应该重定向到结尾没有这个词的 URL?

感谢您的宝贵时间

【问题讨论】:

    标签: .htaccess redirect http-status-code-404


    【解决方案1】:

    在您的.htaccess 文件中:

    RewriteEngine on
    RewriteRule ^(.*)/YourDribble$ http://Some-True-URL/$1 [R=301,L]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-02-10
      • 2012-12-13
      • 1970-01-01
      • 1970-01-01
      • 2016-09-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多