Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如: https ://www.mydomain.de/myproduct/?___store=french&___from_store=german 到 https://www.mydomain.de/myproduct/
我有一家商店,并希望将数百个 url 的商店视图动态永久重写到同一 url 的一部分。
这对于许多通过 301 重定向到产品部分的 URL
你能帮助我吗?
您可以使用此规则剥离查询字符串:
RewriteCond %{QUERY_STRING} ___store= RewriteCond %{QUERY_STRING} ___from_store= RewriteRule (.*) $1? [R=301,QSD,L]
它检查查询字符串是否包含___store=and ___from_store=,然后在没有查询字符串的情况下永久重定向到相同的 URL。
___store=
___from_store=