首页 > 解决方案 > 500 内部服务器错误 - 请求超出了 10 个内部重定向的限制

问题描述

我已经设置了我的服务器并尝试访问该站点并获得 500 内部服务器错误。

我检查了我的日志并发现了以下错误。我没有任何线索,为什么我得到错误。我正在使用 CodeIgniter。

这是错误日志:

[Thu Oct 01 19:24:45.722508 2020] [authz_core:debug] [pid 21444] mod_authz_core.c(809): [client 31.17.253.157:34572] AH01626: authorization result of Require all granted: granted, referer: http://sneakerstore.tk/en/home
[Thu Oct 01 19:24:45.722568 2020] [authz_core:debug] [pid 21444] mod_authz_core.c(809): [client 31.17.253.157:34572] AH01626: authorization result of <RequireAny>: granted, referer: http://sneakerstore.tk/en/home
[Thu Oct 01 19:24:45.723514 2020] [core:error] [pid 21444] [client 31.17.253.157:34572] AH00124: 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://sneakerstore.tk/en/home
[Thu Oct 01 19:24:45.723537 2020] [core:debug] [pid 21444] core.c(3833): [client 31.17.253.157:34572] AH00121: r->uri = /paulshop/index.php, referer: http://sneakerstore.tk/en/home
[Thu Oct 01 19:24:45.723542 2020] [core:debug] [pid 21444] core.c(3840): [client 31.17.253.157:34572] AH00122: redirected from r->uri = /paulshop/index.php, referer: http://sneakerstore.tk/en/home
[Thu Oct 01 19:24:45.723546 2020] [core:debug] [pid 21444] core.c(3840): [client 31.17.253.157:34572] AH00122: redirected from r->uri = /paulshop/index.php, referer: http://sneakerstore.tk/en/home
[Thu Oct 01 19:24:45.723642 2020] [core:debug] [pid 21444] core.c(3840): [client 31.17.253.157:34572] AH00122: redirected from r->uri = /paulshop/index.php, referer: http://sneakerstore.tk/en/home
[Thu Oct 01 19:24:45.723653 2020] [core:debug] [pid 21444] core.c(3840): [client 31.17.253.157:34572] AH00122: redirected from r->uri = /paulshop/index.php, referer: http://sneakerstore.tk/en/home
[Thu Oct 01 19:24:45.723658 2020] [core:debug] [pid 21444] core.c(3840): [client 31.17.253.157:34572] AH00122: redirected from r->uri = /paulshop/index.php, referer: http://sneakerstore.tk/en/home
[Thu Oct 01 19:24:45.723664 2020] [core:debug] [pid 21444] core.c(3840): [client 31.17.253.157:34572] AH00122: redirected from r->uri = /paulshop/index.php, referer: http://sneakerstore.tk/en/home
[Thu Oct 01 19:24:45.723669 2020] [core:debug] [pid 21444] core.c(3840): [client 31.17.253.157:34572] AH00122: redirected from r->uri = /paulshop/index.php, referer: http://sneakerstore.tk/en/home
[Thu Oct 01 19:24:45.723674 2020] [core:debug] [pid 21444] core.c(3840): [client 31.17.253.157:34572] AH00122: redirected from r->uri = /paulshop/index.php, referer: http://sneakerstore.tk/en/home
[Thu Oct 01 19:24:45.723680 2020] [core:debug] [pid 21444] core.c(3840): [client 31.17.253.157:34572] AH00122: redirected from r->uri = /paulshop/index.php, referer: http://sneakerstore.tk/en/home
[Thu Oct 01 19:24:45.723685 2020] [core:debug] [pid 21444] core.c(3840): [client 31.17.253.157:34572] AH00122: redirected from r->uri = /favicon.ico, referer: http://sneakerstore.tk/en/home

这是我的 .htaccess 文件:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /paulshop/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /paulshop/index.php [L]
</IfModule>

这就是网站配置:

    DocumentRoot /var/www/paulshop

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    LogLevel debug

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
<Directory /var/www/paulshop>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
</Directory>

此类调用 url:

<?php

class Web_welcome extends CI_Controller{

    function index()
    {
        $property = $this->Property->get();
        list($lang, $country) = explode('_', $property[0]->lang);
        
        header('location:'.base_url().$lang.'/home');
        exit;
    }

}

这是基本网址:

$config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'].str_replace($_SERVER['DOCUMENT_ROOT'],'', dirname($_SERVER['SCRIPT_FILENAME']));

也许有人知道,如何帮助我。谢谢

标签: phpapache2

解决方案


推荐阅读