带参数的QUERY_STRING

时间:2013-08-20 09:05:58

标签: .htaccess parameters rewrite query-string url-parameters

假设我的URL包含查询字符串参数,如下所示:

/index.php?test=MYID

使用mod_rewrite,如何将它们重定向到这些SES URL?

/index.php?view=MYID

1 个答案:

答案 0 :(得分:0)

尝试:

RewriteEngine On
RewriteCond %{QUERY_STRING} ^test=(.*)$
RewriteRule ^index\.php$ /index.php?view=%1 [L,R=301]
相关问题