如何使用 htaccess URL 以百分比重定向 (301)?

How can I redirect (301) with htaccess URL with percent?

我有很多 URL 必须重定向。示例:

/index.php?act=viewtag&tag=%EB%F8%E9%F1_%E0%E5%E5%F0%F1 >> 至 >> 另一个 URL

/index.php?act=viewtag&tag=%F9%F8%E4_%EE%E9%F9%EC_%E2%EC%F8 >> 至 >> 另一个 URL

每个重定向都应该指向另一个 URL。我的意思是第一个 exmaple 和第二个 exmaple 的目的地不是同一个页面.. 并且有很多重定向与很多不同的 URLs.

有关

您需要使用 mod_rewrite 和 %{QUERY_STRING} 变量:

RewriteEngine On

RewriteCond %{QUERY_STRING} ^act=viewtag&tag=%EB%F8%E9%F1_%E0%E5%E5%F0%F1$
RewriteRule ^(index\.php)?$ /another-url? [L,R]

RewriteCond %{QUERY_STRING} ^act=viewtag&tag=%F9%F8%E4_%EE%E9%F9%EC_%E2%EC%F8$
RewriteRule ^(index\.php)?$ /another-url? [L,R]