0

我已将Yii项目从移动WindowsLinux(Centos)也将文件夹和文件权限更改为readwrite,但是访问时发生错误:

Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster. 

在错误日志中:

[Sat Apr 27 14:54:50.753643 2013] [core:alert] [pid 2153] [client ::1:40135] /opt/lampp/htdocs/ehilal/backend/www/.htaccess: FilterProvider takes three arguments, filter-name provider-name match-expression

.htaccess声明的部分FilterProvider

<IfModule filter_module>
  FilterDeclare   COMPRESS
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
  FilterChain     COMPRESS
  FilterProtocol  COMPRESS  change=yes;byteranges=no
</IfModule>

如何解决?谢谢,

4

1 回答 1

3

过滤器提供程序指令已从 httpd 2.2 更改:

Github 问题建议在 .htaccess 中包含以下修复:

<IfModule mod_filter.c>                                                   
    <IfModule mod_deflate.c>
        AddOutputFilterByType DEFLATE application/atom+xml \
                                      application/javascript \
                                      application/json \
                                      application/rss+xml \
                                      application/vnd.ms-fontobject \
                                      application/x-font-ttf \
                                      application/xhtml+xml \
                                      application/xml \
                                      font/opentype \
                                      image/svg+xml \
                                      image/x-icon \
                                      text/css \
                                      text/html \
                                      text/plain \
                                      text/x-component \
                                      text/xml
    </IfModule>
</IfModule>
于 2013-04-27T10:21:44.727 回答