Apache开启伪静态后报500错误.

出自:http://blog.163.com/lgh_2002/blog/static/44017526201051452939761/

Apache开启伪静态后报500错误.

 检查APACHE日志发现如下信息:

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace.

从逻辑上说不应该出现内部重定向超限,因为我一共才打开了1个链接。怀疑是rewrite模块规则写错了,进入死循环。突然想起了.htaccess文件, 原来这个站点是测试部署在一个子目录/XXXX下,而.htaccess是直接从另一个网站拷贝过来的
RewriteEngine On
RewriteBase  /kohana/
RewriteRule ^(application|modules|system) - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*     index.php/$0 [PT,L] 

解决方法:将红色部分代码改成如下

RewriteRule ^(.*)$    /index.php/$1 [PT,L]

文章来自:http://www.cnblogs.com/ribavnu/p/4288796.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3