【问题标题】:htaccess to redirect/remove /?filter_tag[0]=htaccess 重定向/删除 /?filter_tag[0]=
【发布时间】:2018-10-13 07:03:50
【问题描述】:

Joomla 存在将/?filter_tag[0]= 添加到网址的问题。我现在在Google Search Console 看到他们。

什么是htaccess 代码来重定向/删除/?filter_tag[0]=

示例网址: https://www.example.com/storefront-scissor-gate-mounting-options/?filter_tag[0]=

【问题讨论】:

    标签: apache .htaccess mod-rewrite joomla


    【解决方案1】:

    您可以将此规则用作您的首要规则

    RewriteEngine On
    
    RewriteCond %{QUERY_STRING} ^filter_tag\[0\]= [NC]
    RewriteRule ^ %{REQUEST_URI}? [L,NE,R=301]
    

    %{REQUEST_URI} 之后的? 将从 URI 中删除查询字符串。

    【讨论】:

    • 好的,谢谢!我喜欢学习这样的新东西。我现在可以将它用于其他查询字符串问题。
    猜你喜欢
    • 2012-04-03
    • 2018-02-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-27
    • 2020-10-10
    • 1970-01-01
    相关资源
    最近更新 更多