2016-12-21 96 views
1

我在Laravel做了一个网页迁移到服务器魔女交友, 所有的路线,不同的是像/登录的工作AUTHS发现。 当你试图输入有其路由出现404错误。 这里是页:http://elgloborojocatalogos.com.mx/404错误/登录Laravel

我的路线是:

<?php 

Auth::routes(); 

// Routes or function calls for this project. 
Route::get('/', '[email protected]'); 

Route::get('globos',['uses' =>'[email protected]']); 

Route::post('globos/store',['uses' =>'[email protected]'])->middleware('auth'); 

Route::get('globos/retrieveall',['uses' => '[email protected]'])->middleware('auth'); 

Route::get('globos/retrieve/{no_pages}',['uses'=> '[email protected]'])->middleware('auth'); 

Route::get('globos/pages',['uses'=>'[email protected]'])->middleware('auth'); 

Route::get('globos/pagesp/{type}', ['uses' =>'[email protected]'])->middleware('auth'); 

Route::get('/home', function(){ return redirect('globos/pages');}); 

Route::delete('globos/deleteGlobo/{id}', ['uses' =>'[email protected]'])->middleware('auth'); 

Route::post('globos/findGlobo',['uses'=>'[email protected]'])->middleware('auth'); 

Route::get('globos/imprimirCatalogo',['uses'=>'[email protected]'])->middleware('auth'); 

//Users 
// Authentication Routes... 
Route::get('login', 'Auth\[email protected]'); 
Route::post('login', 'Auth\[email protected]'); 
Route::post('logout', 'Auth\[email protected]'); 
+0

哪个版本的PHP在服务器上运行? –

+1

助手功能验证::路线()会为你注册的路线::获得(“登录”),路线::后(“登录”),路线::后(“注销”)和其他一些(注册,密码忘记了)。你不能手动添加它们。最好的做法是做一个'php工匠路线:列表'并查看那个输出。 – Alex

+0

在服务器上我们使用php 5.6.4 @JeremyHarris –

回答

3

您试图访问http://elgloborojocatalogos.com.mx/login,但它表明未找到文件。这是很明显的,因为你在登录前失踪的index.php像下面

http://elgloborojocatalogos.com.mx/index.php/login 

现在会做的伎俩,但肯定会很难看。因此,要删除index.php,您需要在public_html文件夹中添加一个.htaccess文件,该文件夹是root用户。所以,简单地创建一个文件并将其命名为的.htaccess和复制粘贴此下面的代码行添加到文件。

<IfModule mod_rewrite.c> 
    RewriteEngine On 
    RewriteBase // 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)$ index.php?$1 [L] 
</IfModule> 

应该按预期工作现在

0

你的大部分路线是给了我们一个404,例如:

enter image description here

事件/globos它没有中间件。所以我不得不假设我们没有在你的开发环境中寻找同样的应用程序。你上传了吗?

如果它只是一个认证问题,像/globos/pages这样的页面应该将我们重定向到认证,但这不会发生,所以这是一个普遍的路由问题。

Auth::routes();应该给你登录,注销和注册,所以你不需要创建任何其他登录路由,或者,你可能只是删除该行Auth::routes();行。