gpt4 book ai didi

mod-rewrite - 重写条件 : NoCase option for non-regex pattern '-f' is not supported and will be ignored

转载 作者:行者123 更新时间:2023-12-04 02:45:33 46 4
gpt4 key购买 nike

以下是我的 .htaccess .它运行良好,但我在 error_log 中遇到错误文件:

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


<Files .htaccess>
order allow,deny
deny from all
</Files>

#Options +FollowSymlinks
DirectoryIndex index.php
Options All -Indexes

RewriteEngine on
# remove trailing slash
RewriteRule ^(.*)/$ /$1 [L,R=301]

#Redirect non-www to www
RewriteCond %{HTTP_HOST} !^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://www\.%{HTTP_HOST}/$1 [R=301,L]

RewriteRule ^part_(\d+)$ /detail.php?id=$1 [NC]
RewriteRule ^find_(.+)$ /search.php?q=$1 [NC]

最佳答案

不确定这是否有帮助,但根据此 website , 如果您在 Apache 错误日志中看到以下错误:

[warn] RewriteCond: NoCase option for non-regex pattern ‘-f’ is not 
supported and will be ignored

您应该在 .htaccess 中更改以下行或 httpd.conf
RewriteCond %{REQUEST_FILENAME} !-f [NC]


RewriteCond %{REQUEST_FILENAME} !-f

注意缺少的 [NC]在行尾。

关于mod-rewrite - 重写条件 : NoCase option for non-regex pattern '-f' is not supported and will be ignored,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8479265/

46 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com