试图让RewriteCond不区分大小写的htaccess

时间:2014-03-12 17:25:49

标签: apache .htaccess mod-rewrite

RewriteEngine on
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php

我使用上面的代码删除所有页面的文件扩展名。 但是,它不是Case Insensitive。示例:www.mysite.com/contact工作正常,但www.mysite.com/Contact会出错。

IMP:我已经尝试将[NC]放在两个代码行的前面。

感谢任何帮助。

0 个答案:

没有答案