I have been developing locally on MAMP with no probelms. Today I added this to my config/main.php to beautify the urls.
Keep in mind that everything works fine in my program without this code. After I added the code I go to mysite.com/index.php/site/login and chrome tells me:
"This webpage has a redirect loop
The webpage at mysite.com/index.php/site/login has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer."
Here is my controller code for site/login
Anybody have any idea what is causing the problem here when I switch on the UrlManager???
'urlManager'=>array(
'urlFormat'=>'path',
'rules' => array(
'' => 'video/player',
),
),
Keep in mind that everything works fine in my program without this code. After I added the code I go to mysite.com/index.php/site/login and chrome tells me:
"This webpage has a redirect loop
The webpage at mysite.com/index.php/site/login has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer."
Here is my controller code for site/login
public function actionLogin()
{
$this->layout='login';
$model=new LoginForm;
// if it is ajax validation request
if(isset($_POST['ajax']) && $_POST['ajax']==='login-form')
{
echo CActiveForm::validate($model);
Yii::app()->end();
}
// collect user input data
if(isset($_POST['LoginForm']))
{
$model->attributes=$_POST['LoginForm'];
// validate user input and redirect to the previous page if valid
if($model->validate() && $model->login())
$this->redirect(Yii::app()->user->returnUrl);
}
// display the login form
$this->render('login',array('model'=>$model));
}
Anybody have any idea what is causing the problem here when I switch on the UrlManager???