500内部服务器错误.htaccess:没有匹配<files>部分,referer:http:// localhost / </files>

时间:2013-03-13 11:08:08

标签: apache

您好我的Apache错误日志文件出现以下错误...而500内部服务器错误帮我解决了这个问题。

[Wed Mar 13 16:33:13 2013] [alert] [client 127.0.0.1] C:/wamp/www/phpwork/.htaccess: </files> without matching <files> section, referer: http://localhost/

我的.htaccess文件是

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule (.*\.(png|gif|jpg|jpeg|js|css|swf))$ webroot/img_handler.php?arg=$1 [L] 
   RewriteRule    ^$ webroot/    [L]
   RewriteRule    (.*) webroot/$1 [L]
</IfModule>

# disable directory browsing -IMPORTANT, do NOT remove.
Options -Indexes

# protect the htaccess file
<files .htaccess>
order allow,deny
deny from all
</files>

# disable the server signature
ServerSignature Off


# protect php.ini
#<files *.ini>
order allow,deny
deny from all
</files>

1 个答案:

答案 0 :(得分:0)

# protect php.ini
#<files *.ini>
order allow,deny
deny from all
</files>

在这里你评论了“文件”指令

请删除评论以执行与此相同的文件部分:

<files *.ini>
order allow,deny
deny from all
</files>