我已經使用瞭如此多的代碼來重定向我的子文件夾url,但無法正常工作。Htaccess單獨爲我的域子文件夾工作
From :: http://www.mydomain.com/doctor/searchresult.php?txtcity=Chennai&txtarea=Annanagar
To :: http://www.mydomain.com/doctor/Chennai/Annanagar
所使用的htaccess的代碼下面給出
RewriteRule ^doctor/([a-zA-Z0-9_-]+)/searchresult$ /doctor/searchresult.php?txtcity=$1&txtarea=$2 [R=301,L]
RewriteRule ^([a-zA-Z0-9_-]+)/doctor/$ searchresult.php?txtcity=$1&txtarea=$2
RewriteRule ^doctor/([a-zA-Z0-9_-]+) /doctor/searchDocResult.php?selFindDocCity=$1&txtFindDocAreaRzip=$2 [L]
你想完成什麼?第一條規則是外部重定向(意思是「txtcity」變體是公開可見的)。規則引用匹配'$ 1'和'$ 2',但每個只有一個捕獲組。在這種情況下'searchDocResult.php'是做什麼的? – 2013-03-05 18:26:31