0

I am using Laravel Lumen microframework v5.4.6

When trying to load page http://lumen.dev/dax30 everything works fine, but when I request page http://lumen.dev/dax30/ (with ending slash (/) at the URL end) I receive a NotFoundHttpException error.

My routes.php file:

$_app = $this->app;
$_app->group(['prefix' => 'dax30'], function () use ($_app){
    $_app->get('/', 'Landings\Dax30\Controllers\IndexController@index');
});

Question: How to open this page with and without slash with no error?

mickmackusa
  • 43,625
  • 12
  • 83
  • 136
mixa_ru
  • 573
  • 1
  • 6
  • 12

1 Answers1

1

This is because Laravel consider both as different routes, although you can resolve this issue by changing your .htaccess file. Please have a look at this answer Laravel 5 bad behaviour while removing trailing slash

Th3
  • 124
  • 2
  • 9