问题
How to rewrite paths like:
/xyz/ijk?a=b&c=d
to index.php:
/index.php/xyz/ijk?a=b&c=d
But with variable PATH_INFO = /xyz/ijk as it's when i don't use rewrite (/index.php/xyz/ijk?a=b&c=d)
回答1:
Try something like this:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA ]
来源:https://stackoverflow.com/questions/5965226/apache-rewrite-all-paths-to-index-php