多年来,我一直在使用相同的 .htaccess 来控制 apache 上的 url 重写,但是现在我收到以下错误:
[Wed May 08 17:14:16 2013] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.
[Wed May 08 17:14:16 2013] [warn] RewriteCond: NoCase option for non-regex pattern '-d' is not supported and will be ignored.
[Wed May 08 17:14:16 2013] [warn] RewriteCond: NoCase option for non-regex pattern '-l' is not supported and will be ignored.
我的 .htaccess 如下:
# << Friendly URL's
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php
# >> Friendly URL's
#RewriteCond %{HTTP_HOST} ^mydomain\.com\.br$ [OR]
#RewriteCond %{HTTP_HOST} ^www\.mydomain\.com\.br$
#RewriteRule ^/?$ "http\:\/\/www\.mydomain\.com\.br\/" [R=301,L]
RewriteCond %{HTTP_HOST} !^www.mydomain.com.br$
RewriteRule ^(.*)$ http://www.mydomain.com.br/$1 [R=301]
由于我对 .htaccess 的用法了解不多,所以我不知道发生了什么。事实上,我很久以前就了解了一些关于 .htaccess 的知识来构建这个文件,但是它不再起作用了。有人可以帮我解决这个错误吗?
首先十分感谢!