Apache将所有路径重写为index.php

Apache将所有路径重写为index.php,apache,.htaccess,mod-rewrite,Apache,.htaccess,Mod Rewrite,如何重写路径,如: /xyz/ijk?a=b&c=d 要使用index.php,请执行以下操作: /index.php/xyz/ijk?a=b&c=d 但是当我不使用rewrite(/index.php/xyz/ijk?a=b&c=d)时,如果使用变量PATH_INFO=/xyz/ijk,请尝试以下操作: RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA ]

如何重写路径,如:

/xyz/ijk?a=b&c=d
要使用index.php,请执行以下操作:

/index.php/xyz/ijk?a=b&c=d

但是当我不使用rewrite(/index.php/xyz/ijk?a=b&c=d)时,如果使用变量PATH_INFO=/xyz/ijk,请尝试以下操作:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA ]