php - 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']));
也许有人知道,如何帮助我。谢谢
解决方案
推荐阅读
- reactjs - Expo 无法在 Typescript 中的 Visual Studio 代码上自动导入 React-native
- android - 如何在不克隆整个 android 库的情况下在 Android Studio 中构建部分 Android 源代码?
- typescript - 如何输入这个 Maybe 函子?
- excel - 动态查找单元格中的多个值(逗号分隔)并将相应的 ID 返回到单个单元格(逗号分隔)
- c# - Windows 服务中的连续异步 Ping
- python - 如何定义具有列表属性的 python 类和接受可变参数的类构造函数?
- python - 如何停止分配前引用的 UnboundLocalError
- tensorflow - 如何使用所有 cpu 核心在 keras 中训练模型
- python - 如何使用从小部件文本框中输入的单词来搜索数据框,然后使用 python、ipywidgets 显示搜索结果?
- powershell - Powershell - Active Directory 不返回属性值