htaccess - 将带参数的 URL 重定向到具有另一个参数的同一 URL


htaccess - Redirecting URL with parameter to same URL with another parameters

我有某种网站,我遇到了一个问题。

基本上,我想要的只是暂时将包含特定参数的任何链接重定向到同一链接,但使用另一个参数。我已经对.htaccess和参数进行了一些研究,但我无法弄清楚语法。

例:

From: 
http://domain.com/link?___store=default
To:
http://domain.com/link?___store=english

以下指令添加到您的 .htaccess 中:

RewriteEngine on
RewriteCond %{QUERY_STRING} ^___store=(default)(.*)$
RewriteRule ^(.*)$ $1?___store=english%2 [R=301,L]

希望这对你有帮助。 :)