从/?act = view& id = NUMBER到URL
的示例:
/?act = view& id = 1 to http://google.com
/?act = view& id = 2 to http://facebook.com/blabla
我的代码
Redirect 301 /?act=view&id=157 http://google.com

答案 0 :(得分:0)
您无法使用重定向指令操纵查询字符串,您需要使用mod-rewrite,
尝试:
RewriteEngine on
#1)Redirect "?act=view&id=1" to "http://google.com/"#
RewriteCond %{THE_REQUEST} \?act=view&id=1 [NC]
RewriteRule ^ http://google.com/? [NC,L,R]
#2)Redirect "?act=view&id=2" to "http://facebook.com/"#
RewriteCond %{THE_REQUEST} \?act=view&id=2 [NC]
RewriteRule ^ http://facebook.com/? [NC,L,R]