如何编写php.ini以使
主页/xyz/
指
home/c/index.php?q=xyz
不创建xyz目录。
试试这个
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^home/(.*)/?$ /home/c/index.php?q=$1 [L]
这应该重定向home/中所有不存在的文件/目录
EDIT:删除尾部斜线
如何编写php.ini以使
主页/xyz/
指
home/c/index.php?q=xyz
不创建xyz目录。
试试这个
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^home/(.*)/?$ /home/c/index.php?q=$1 [L]
这应该重定向home/中所有不存在的文件/目录
EDIT:删除尾部斜线