Answer the question
In order to leave comments, you need to log in
Why doesn't redirect work in Yii when index.php is outside the project folder?
The Yii project is located in the site.com/SiteCore
folder.
There, inside this folder, there is protected, yii itself, and other files.
At the same time, the index.php file is not in site.com/SiteCore , but in site.com , and everything is written in it way so
<?php
// change the following paths if necessary
$yii=dirname(__FILE__).'/SiteCore/yii/framework/yii.php';
$config=dirname(__FILE__).'/SiteCore/protected/config/main.php';
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
require_once($yii);
Yii::createWebApplication($config)->run();
?>
Answer the question
In order to leave comments, you need to log in
I found the joint myself, it was in a banal gap.
Cut off this case right away, since it worked in the SiteCore folder. But it turned out that the space was in the index itself at the beginning, this is how the FTP client added when editing ....
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question