0
您好我想從重定向 http://www.domain.com/prod.php?id=23要http://www.domain.com/index.php?q=35.htaccess的重寫
我試着像下面
RewriteRule ^(.*)/prod.php\?products_id=23$ $1/index.php?q=35 [NC,L]
但不工作
下面的作品,但我要爲特定的重定向請求參數。
redirect /prod.php http://www.domain.com/index.php?q=35 [NC,L]
我得到了它,它是
RewriteCond %{query_string} ^products_id=23 [NC]
RewriteRule prod\.php$ /index.php?q=35 [R=301,L]
你絕對需要這樣的網址:/prod.php?id=32或者你可以去更多的搜索引擎優化導向的URL,如:/ product/32 –