我有一个类似www.example.com/coupon/searchresult.php?txtCity=Chennai&txtArea=Annanagar的路径。对于上述子文件夹的路径文件,htaccess不起作用。这是我第一次使用htaccess。所以请给出你的答案。提前感谢.....
RewriteRule ^([a-zA-Z0-9_-]+)/coupon/([a-zA-Z0-9_-]+)/$ searchresult.php?txtcity=$1&txtarea=$2
或
RewriteRule ^([a-zA-Z0-9_-]+)/coupon/$ searchresult.php?txtcity=$1&txtarea=$2
请使用这个,并修改为您希望它会帮助你确定!