0
我希望我的.htaccess文件重寫任何不存在於index.php文件中的內容。因此,例如:www.example.com/category/subcategory/product1/
將被重寫爲index.php?request=category/subcategory/product1
mod_rewrite - 將所有不存在的內容發送到index.php
我想執行檢查以查看目錄是否先存在,如果存在,則不要重寫。我目前所面對的是這樣的,但只需要知道我怎樣才能得到所請求的URL到PHP $_GET
變量:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /index.php [L]
任何幫助先進的感謝!