php - Laravel Routing error -
i'm getting started laravel. i've installed it. when i'm making new route it's not working, it's saying:
the requested url /laravel/public/test not found on server.
this routes.php:
route::get('/', function () { > return view('welcome'); }); > route::get('/test', function () { > return view('test'); }); and of course i've made view called test. when go to:
i'm seeing laravel start template. when go to:
> http://localhost/laravel/public/test it's not working?
and why can visit:
thankyou.
edit:
<ifmodule mod_rewrite.c> <ifmodule mod_negotiation.c> options -multiviews </ifmodule> rewriteengine on # redirect trailing slashes if not folder... rewritecond %{request_filename} !-d rewriterule ^(.*)/$ /$1 [l,r=301] # handle front controller... rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^ index.php [l] </ifmodule>
i imagine issue .htaccess.
this works > http://localhost/laravel/public/index.php/test now .htaccess should contain logic pass requests index.php default. if that's case, it's issue virtual host entry not having allowoverride all within <directory> block.
note allowoverride all not choice production environment.
Comments
Post a Comment