这条规则都是:
RewriteEngine on
RewriteCond %{REQUEST_URI} \.php$
RewriteRule \.php$ /PHPTest/AB/index.php [L]
......而且这一个:
RewriteEngine on
RewriteCond %{REQUEST_URI} \.php.*$
RewriteRule \.php.*$ /PHPTest/AB/index.php [L]
...导致此错误:
500 Internal Server Error
为什么?
答案 0 :(得分:1)
您的规则正在生成500 Internal Server Error
,因为您正在导致无限循环,当Apache用完Max重定向限制时,它会向浏览器返回500个http代码。
如果要修复它,请将代码更改为:
RewriteCond %{REQUEST_URI} !^/PHPTest/AB/index\.php
RewriteRule \.php$ /PHPTest/AB/index.php [L]
高于RewriteCond
将阻止在第一次重定向到/PHPTest/AB/index.php