2013-08-20 36 views
0

假設我有這樣的查詢字符串參數的URL:QUERY_STRING與參數

/index.php?test=MYID 

使用mod_rewrite,我怎麼可以重定向他們SES URL喜歡這些?

/index.php?view=MYID 

回答

0

嘗試:

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