我需要重定向這樣的頁面重定向包括的.htaccess查詢字符串
http://www.domain.com/list.php?id=bla&variable2=product1-product2-product3
重定向(值可以在查詢字符串更改)
http://www.domain.com/list.html?id=bla&variable2=product1-product2-product3
所有我需要的是它將更改爲.html,但其他內容在定製鏈接上應保持不變。
有幫助嗎?
我需要重定向這樣的頁面重定向包括的.htaccess查詢字符串
http://www.domain.com/list.php?id=bla&variable2=product1-product2-product3
重定向(值可以在查詢字符串更改)
http://www.domain.com/list.html?id=bla&variable2=product1-product2-product3
所有我需要的是它將更改爲.html,但其他內容在定製鏈接上應保持不變。
有幫助嗎?
在list.php文件中執行重定向而不是使用.htaccess文件是不是一個好主意?
如何像:
header('Location: http://www.domain.com/list.html?'+$querystring);
在
list.php
?
把這個放在你的htaccess中,應該就夠了。
RewriteRule ^([^.]+).html$ /$1.php [QSA,L]
(順便說一句,這是沒用的,做到這一點...)
那不是一個壞主意.. :) – Andy 2012-07-27 13:55:52
但麻煩的是,我需要讓頁面外的所有顯示器框架規則和重定向...謝謝你的建議。 – Andy 2012-07-27 13:56:27