我正在尝试使用MAMP在我的本地计算机上进行实时应用程序。我们有Codeigniter应用程序。我完成了设置。我可以访问我们的申请主页,例如http://dev.myApp.md
但是当我尝试打开http://dev.myApp.md/login时,它会在http://dev.myApp.md/error页面上重定向我。
显示
This webpage has a redirect loop
ERR_TOO_MANY_REDIRECTS
登录控制器:
我试过:
尝试删除htaccess文件 但它不起作用。 请帮忙!
function login_portal($ reason = null){
$this->load->library('user_agent');
$this->is_chrome = false;
$server_type = $this->config->item('server_type');
if($this->member->checkAuth() && !$this->member->checkSignup()){
redirect(base_url('dashboard'));
}
$data = array();
$data['username'] = $this->input->get('email');
$data['notice'] = $this->getLoginErrorMessage($reason);
$this->load->model('corporate_data');
$corporate_name_alias = $this->input->get('g');
$corporate_data = $corporate_name_alias? $this->corporate_data->getCorporationDetails(array('name_alias'=>$corporate_name_alias)) : false;
$title = ($corporate_data[0]->name)?$corporate_data[0]->name:'Activation Process';
$all_data = array(
'page_view'=>'account/login/login_portal',
'page_data'=>$data,
'header_data'=>array('script_declarations'=>array('just_validated'=> '',
'title' =>$title
// 'just_validated' => ($this->db_session->userdata('email_validation_passed'))? 'Thank you for verifying your email. Please log in below to confirm your account information.':''
)
),
'sections'=>array('nav'=>false,'submenu'=>false)
);
if($corporate_data){
if(strpos($corporate_data[0]->name_alias, 'starbucks')!==FALSE){
$corporate_data[0]->employee_name = 'partner';
}else{
$corporate_data[0]->employee_name = 'employee';
}
}
$all_data['page_data']['corporate_data'] = $corporate_data? $corporate_data[0] : false;
$all_data['page_view'] = 'account/login/corporate';
$all_data['header_data']['scripts'] = array('utilities/custom_form_validation', 'utilities/monthdayyear','corporate_login_portal','jquery-ui-1.8.14.custom.min','activation');
$all_data['header_data']['stylesheets'] = array('activation');
$all_data['header_data']['script_declarations']['corporate_data'] = $corporate_data? ((array) $corporate_data[0]): false;
if($this->input->is_ajax_request()){
$this->load->view('utilities/login_form_guider');
}else{
pr($all_data, 0);
loadViews($all_data);
}
}