1
我有以下.htacess文件删除PHP扩展和创建SEO友好的URL:500只在本地主机上的.htaccess内部错误 - 重定向循环
RewriteEngine On
ErrorDocument 404 /404.php
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^(.+)\.php$ /$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)$ index.php?page=$1 [L]
这工作绝对没上托管时,我们的域,但是当我在本地主机服务器上进行本地测试时,会出现错误500,内部服务器错误。
在我的httpd.conf文件,重写模块未注释:
LoadModule rewrite_module modules/mod_rewrite.so
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., referer: http://localhost:8888/Website/
任何想法?
我很感谢帮助,但似乎有同样的问题。 –
是否还有其他规则或任何其他.htaccess? – anubhava
不,您在OP中发布的htaccess文件中看到的是我的.htaccess文件中的内容。它似乎很奇怪,它在我的域名上运行,但不在localhost上。 –