【问题标题】:htaccess dynamically rewritehtaccess 动态重写
【发布时间】:2018-06-02 21:36:29
【问题描述】:

示例: https://www.mydomain.de/myproduct/?___store=french&___from_store=germanhttps://www.mydomain.de/myproduct/

我有一家商店,想将数百个 url 的 storeview 动态永久重写为同一 url 的一部分。

这对于许多通过 301 重定向到产品部分的 URL 而言

你能帮帮我吗?

【问题讨论】:

    标签: .htaccess magento redirect permanent


    【解决方案1】:

    您可以使用此规则来剥离查询字符串:

    RewriteCond      %{QUERY_STRING}    ___store=
    RewriteCond      %{QUERY_STRING}    ___from_store=
    RewriteRule      (.*)               $1?     [R=301,QSD,L]
    

    它检查查询字符串是否包含___store=___from_store=,然后在没有查询字符串的情况下永久重定向到同一个 URL。

    【讨论】:

      猜你喜欢
      • 2011-09-18
      • 2011-06-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多