我有3个目录级别的页面,城市,类别和业务
。纽约/餐厅/麦当劳。
有city。php category。php business。php
。city.php吗?url =纽约,category.php吗?Url =new-york/restaurants, and business.php?url =麦当劳
我如何创建一个mod_rewrite,这将使:/new-york,/new-york/restaurants, and/mcdonalds
试试这个
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^/new-york/(.*)$ category.php?url=new-york/$2 [L]