TP5隐藏index.php出现500错误问题

浏览:2579 发布日期:2017/11/07 分类:ThinkPHP5专区
官方的代码是这样的:
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
使用官方的代码会出现500错误,修改后的代码:
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php/$1 [QSA,PT,L]
</IfModule>

修改成这样就正常了,有没有和我遇到同样问题的?是什么原因呢?
查看Apache日志,发现类似这样的错误日志:
[Tue Nov 07 23:43:20 2017] [error] [client 127.0.0.1] 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.
最佳答案
评论( 相关
后面还有条评论,点击查看>>