Laravel Routes Are Returning "404 Not Found" Error After Moving To Production

I wrote an application using Laravel 5.2. It developed the application using XAMP server on my local machine and everything is good and tested.

Now, I am ready to move the application to a production environment. On a new server running on Windows Server 2008 R2, I installed Apache 2.4.18 and and PHP 5.6.18. I enabled the following php extensions

  1. OpenSSL PHP Extension
  2. PDO PHP Extension
  3. Mbstring PHP Extension
  4. Tokenizer PHP Extension

I was able to use php artisan migrate command to create my databases. But, non of my routes are accessible. When I go to it displays "Laravel 5" which tells me that Laravel is setup.

Why non of my routes are working? Every route I go it I get a 404 Not Found error.

What else I need to do in order for the routes to work?



I solved the problem by following the following steps

Open apache httpd.conf and find this line :

#LoadModule rewrite_module modules/
  1. Uncomment this line (remove the #)

  2. Save httpd.conf

  3. Restart Apache