我想用htaccess的301重定向(不是重写)的网址,如:
I want to use htaccess to 301 redirect (not rewrite) urls like:
brands.php?品牌=索尼
brands.php?brand=Sony
到
品牌/索尼
我怎样才能做到这一点?鸭preciate你的帮助提前。
How can i do that? Appreciate your help in advance.
所以,你的用户正在进入 brands.php?品牌=索尼
到他们的浏览器,重定向?如果我有正确的,这是简单的:
So your users are entering brands.php?brand=Sony
into their browser, and being redirected? If I have that correct, it's simple:
RewriteEngine On
RewriteCond %{QUERY_STRING} brand=([^&]+) [NC]
RewriteRule brands.php brands/%1 [L,R=301]