Laravel 5.1"这个网页有一个重定向循环"

时间:2015-08-27 15:54:35

标签: php laravel-5 laravel-5.1

在localhost中完成我的项目后,我已将项目上传到服务器,假设网址是www.example.com。我将整个项目上传到public_html并将所有文件从公共上传到root,即public_html,并编辑index.php指向bootstrap autoload.php和app.php。但是当我尝试访问像www.example.com这样的网址时,我会收到类似

的错误

此网页有重定向循环

ERR_TOO_MANY_REDIRECTS

我的routes.php是

<?php 

Route::get('/dashboard',array(
    'as'    => 'dashboard',
    'uses'  => 'UserController@index'
));


Route::get('/dashboard/activate_user', array(
    'as'    => 'active-user',
    'uses'  => 'UserController@activate_user'
));


Route::post('/dashboard/activate_user',array(
    'as'    => 'active-user',
    'uses'  => 'UserController@activate_user_post'
)); 

/**
 * User routes
 */
//display the form to add user 
Route::get('/dashboard/create_user',array(
    'as'    => 'create-user',
    'uses'  => 'UserController@create_user'
));
//insert data into db
Route::post('/dashboard/create_user', array(
    'as'    => 'create-user-post',
    'uses'  => 'UserController@create_user_post'
));

//list user 
Route::get('/dashboard/list_users',array(
    'as'    => 'list-user',
    'uses'  =>'UserController@list_users'
));
//view user
Route::get('dashboard/view_users/{id}',array(
    'as'    => 'view-user',
    'uses'  =>'UserController@view_users'
));

//delete user 
Route::get('dashboard/delete_user/{id}',array(
    'as'    => 'delete-user',
    'uses'  => 'UserController@delete_user'
));

//edit user 
Route::get('dashboard/edit_user/{id}', array(
    'as'    => 'edit-user',
    'uses'  => 'UserController@edit_user'
));
Route::post('dashboard/edit_user/{id}',array(
    'as'    => 'edit-user',
    'uses'  => 'UserController@edit_user_post'
)); 



/* (Painfully) Using laravel magic */
// Authentication routes...
Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('dashboard/logout', 'Auth\AuthController@getLogout');

// Registration routes...
Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');


//service controller 
Route::get('dashboard/add_service','ServiceController@create');
Route::post('dashboard/add_service','ServiceController@store');
Route::get('dashboard/list_service','ServiceController@index');
Route::get('dashboard/edit_service/{id}','ServiceController@edit');
Route::post('dashboard/edit_service/{id}','ServiceController@update');
Route::get('dashboard/delete_service/{id}','ServiceController@destroy');



//profile controller 
Route::get('/dashboard/profile/edit/org/{id}',array(
    'as'=> 'edit-org',
    'uses'=>'ProfileController@editOrg'
));

Route::post('/dashboard/profile/edit/org/{id}',array(
    'as'=> 'edit-org-post',
    'uses'=>'ProfileController@updateOrg'
));

Route::get('/dashboard/profile/edit/person/{id}',array(
    'as'=> 'edit-person',
    'uses'=>'ProfileController@editPerson'
));

Route::post('/dashboard/profile/edit/person/{id}',array(
    'as'=> 'edit-person-post',
    'uses'=>'ProfileController@updatePerson'
));

Route::get('/dashboard/profile/edit/logo/{id}',array(
    'as'    => 'edit-logo',
    'uses'  => 'ProfileController@deleteImage'

));


Route::get('/search',array(
    'as'    => 'search-result',
    'uses'  => 'SearchLogController@index'
));

Route::post('/agent-search-log',array(
    'as'    => 'agent-search-log',
    'uses'  => 'SearchLogController@agentSearchLog'
));

/* route to display the search log graph **/
Route::get('/search/graph',array(
    'as'    => 'search-result-graph',
    'uses'  => 'SearchLogController@searchFlightGraph'
));

Route::post('/search/graph/agent',array(
    'as'    => 'search-result-agent-graph',
    'uses'  => 'SearchLogController@searchAgentFlightGraph'
));


Route::post('/search-from-to',array(
    'as'=> 'download-search-log',
    'uses'=> 'SearchLogController@downloadFromTo'
));



/* excel route */
Route::get('/search/download',array(
    'as'    => 'search-download-excel',
    'uses'  => 'SearchLogController@downloadExcel'
));

0 个答案:

没有答案