您的位置:首页 > 运维架构

RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.

2014-12-02 13:04 1561 查看
报错提示:

[Tue Dec 02 13:00:53.567492 2014] [rewrite:warn] [pid 10140:tid 3520] AH00665: RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored. (/home/xxx/.htaccess:48)
[Tue Dec 02 13:00:53.567492 2014] [rewrite:warn] [pid 10140:tid 3520] AH00665: RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored. (/home/xxx/.htaccess:52)


原因:

在 -F 背后加入了[NC]参数

解决办法:

去掉[NC] 参数!

#如果存在生成的.html文件,指向
RewriteCond %{DOCUMENT_ROOT}/Html/%{HTTP_HOST}/$1/index.html -F
RewriteRule ^(.*)$ Html/%{HTTP_HOST}/$1/index.html [L,T=text/html]

#robots.txt 类似的文件直接指向Virtual文件夹
RewriteCond %{DOCUMENT_ROOT}/Virtual/%{HTTP_HOST}/$1 -F
RewriteRule ^(.*)$ Virtual/%{HTTP_HOST}/$1 [L,T=text/html]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Apache
相关文章推荐