2014-01-06 123 views
0

如何重定向重寫URL與.htaccess文件

<http://coralpoolsupplies.com/temp33/default.aspx?PID=26&DID=1101> 

<http://coralpoolsupplies.com/qualifications> 

我目前的htaccess如下:

<RewriteEngine on 
    RewriteCond %{QUERY_STRING} PID=26 
    RewriteRule ^temp33/default\.aspx$ /qualifications/? [R=301]> 
+0

什麼是上面的.htaccess的位置? – anubhava

回答

0

檢查這個答案: Mod Rewrite, pass parameters from URL1 to URL2

您需要添加QSA標誌才能傳遞查詢參數。

試着這麼做:

RewriteEngine on 
RewriteCond %{QUERY_STRING} PID=26 
RewriteRule ^/temp33/default\.aspx /qualifications/ [R=301,QSA]