我有两种类型的页面遵循非常相似的规则。我正在尝试重写每种页面类型的规则,但我遇到了一些问题。
RewriteRule (mission|story|advertise)\.html $1.php [L]
##Symptom Pages
RewriteCond %{REQUEST_URI} !(.*)/health-food.html (condition duplicated for all category page urls)
RewriteRule ^health-conditions/([^.]+)\.html?$ php/symptom.php?symptoms_url=$1 [L]
#http://www.example.com/conditions/autism.html
##Email Pages
RewriteRule ^([^/]+)-([^/]+)/([^.]+)/([^.]+)\.html?$ php/email.php?slug=$1®ion_slug=$2&vendor_Slug=$3&email=$4 [L,QSA,NC]
##Vendor Pages
RewriteRule ^([^/]+)-([^/]+)/([^.]+)\.html?$ php/vendor.php?slug=$1®ion_slug=$2&vendor_Slug=$3 [L,QSA,NC]
##Listing Pages
RewriteRule ^([^/]+)-([^.]+)\.html?$ php/listing.php?slug=$1®ion_slug=$2 [L,QSA,NC]
#http://www.example.com/allergy-specialists-new-york.html
##Category Pages
RewriteRule ^([^/.]+)\.html?$ php/category2.php?slug=$1 [L,QSA,NC]
#http://www.example.com/allergy-specialists.html
2字状态(列出页面)导致加载错误的文件。 http://www.example.com/allergy-specialists-new-york.html不起作用,但http://www.example.com/allergy-specialists-ohio.html确实有效。
我尝试过切换订单,这只会导致其他页面拉错文件。请帮忙。
谢谢
答案 0 :(得分:0)
解决此问题的最简单方法是在"中添加"进入列表页面网址(即:example.com/allergy-specialists-in-new-york.html)。这纠正了任何冲突的htaccess规则。