0

当我查看我的网站时,localhost它运行良好。当我尝试在我的网络 ip 上打开它时,我(192.68.x.x) or 127.0.0.1收到错误 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.

我在 so 上读到了同样的错误,我得到了一些应该可以工作的 htaccess 示例,尝试了所有但我只是不断收到消息,并且在某些情况下http://localhost也停止工作。我的 htaccess 将所有内容重定向回 index.php,从我开始我的网站类。

这是我的 htaccess :

RewriteEngine on
RewriteBase /
RewriteCond  %{REQUEST_FILENAME} !-f
RewriteCond  %{REQUEST_FILENAME} !-d
RewriteRule  ^(.*)$ index.php?param=$1 [QSA,L]

谁能指出我正确的方向?谢谢!

4

1 回答 1

0

1/ 检查您的主机文件中是否有此规则:127.0.0.1 localhost.

2/ 检查 Apacherewrite_module是否被激活。

3/ 确保您的项目位于子文件夹中(以我们mysite/为例)。

4/ 设置你的根 htaccess ( /.htaccess):

Options -Indexes +FollowSymlinks
RewriteEngine On
RewriteBase /

5/ 设置您的项目 htaccess ( /mysite/.htaccess) :

RewriteEngine on
RewriteBase /mysite/
RewriteCond  %{REQUEST_FILENAME} !-f
RewriteCond  %{REQUEST_FILENAME} !-d
RewriteRule  ^(.*)$ index.php?param=$1 [QSA,L]
于 2013-04-03T15:38:41.680 回答