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]
任何帮助先进的感谢!