最佳答案
尝试这个规则:
RewriteRule ^index/(.*) index.php/$1
如果您也想删除 index/
,请尝试以下操作:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule !^index\.php$ index.php%{REQUEST_URI}
关于php - 使用 mod_rewrite 删除 .php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1171079/