WAMP, Laravel 5: Routes not working - NotFoundHttpException

空扰寡人 提交于 2019-12-12 15:25:28

问题


I'm using Laravel 5 with WAMP on my local machine, no virtualization. After creating a fresh project using Composer called "LaravelProject", I can't seem to get my routes working at all. What I've already done:

  • Edited httpd.conf to uncomment the line

    LoadModule rewrite_module modules/mod_rewrite.so

  • Edited the /public/.htaccess file to be

    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

  • Refreshed WAMP

  • "localhost/laravelproject/public" works
  • "localhost/laravelproject/public/index.php/signup" works
  • "localhost/laravelproject/public/signup" throws the NotFoundHttpException

The error:

Sorry, the page you are looking for could not be found.
NotFoundHttpException in RouteCollection.php line 161

routes.php:

Route::get('/', function() {
    return view('welcome');
});


Route::get('/signup', function() {
    return view('auth.signup');
});

All other questions I've found say that it's an .htaccess and mod_rewrite problem, but I have already tried those solutions. This is a completely fresh installation, the only extra file is the signup.blade.php view. Please help!

来源:https://stackoverflow.com/questions/33116498/wamp-laravel-5-routes-not-working-notfoundhttpexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!