@jiester

Как убрать ошибку Request exceeded the limit of 10 internal redirects?

Делал сайт на YII2. На локальном сервере всё работает стабильно, но при переносе на хостинг выдаёт ошибку:
ocr
В error_log написано: "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."

.htaccess в корневой папке:
RewriteEngine on
RewriteBase /
RewriteRule ^(.+)?$ Shop/web/$1

.htaccess в папке web:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteBase /
RewriteRule . index.php [L]
Options +FollowSymLinks
IndexIgnore */*

index.php находится в корневой папке. Его код:
// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
define('YII_ENABLE_ERROR_HANDLER', false);
define('YII_ENABLE_EXCEPTION_HANDLER', false);
// Turn off all error reporting
// error_reporting(0);
// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
$config = require __DIR__ . '/config/web.php';
(new yii\web\Application($config))->run();
  • Вопрос задан
  • 88 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы