RFFRED
5 months ago
385
3
Laravel

URL not working

Posted 5 months ago by RFFRED

Hi,

I have setup the following routes.

/* ----------------------- Admin Routes START -------------------------------- */

/**
 * Admin Auth Route(s)
 */
Route::prefix('/admin/')->name('admin.')->namespace('Admin\Auth')->group(function(){

    //Login Routes
    Route::get('/login','[email protected]')->name('login');
    Route::post('/login','[email protected]');
    Route::post('/logout','[email protected]')->name('logout');

    //Forgot Password Routes
    Route::get('/password/reset','[email protected]')->name('password.request');
    Route::post('/password/email','[email protected]')->name('password.email');

    //Reset Password Routes
    Route::get('/password/reset/{token}','[email protected]')->name('password.reset');
    Route::post('/password/reset','[email protected]')->name('password.update');

});




//Runs with auth middleware
Route::prefix('/admin')->middleware('auth:admin')->name('admin.')->namespace('Admin')->group(function(){
    
    App::setLocale(Session::get('lang'));

    Route::get('dashboard','[email protected]')->name('dashboard');

    Route::get('home', '[email protected]')->name('home');

    Route::get('logs','[email protected]', ['only' => ['index'] ])->name('logs.index');

    Route::get('errors-log','[email protected]', ['only' => ['index'] ])->name('errorslog.index');

});

/* ----------------------- Admin Routes END -------------------------------- */

if I go to /admin/, I keep getting: The requested resource /admin/ was not found on this server.

I added in my route

    Route::redirect('/', '/dashboard');
    Route::get('','[email protected]');

but that does not help.

Is it because there is nothing after the second forward slash. Do I need to add a 301 redirect in the .htaccess??

Any idea?

Please sign in or create an account to participate in this conversation.