php.ini to write for home/xyz to be home/c?q=xyz


php.ini to write for home/xyz to be home/c?q=xyz

如何编写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:删除尾部斜线