0

I have created application in Laravel 4. It's giving URL problems. For example: if I used http://example.com/login, it's displaying a 404 error.

But if I used http://example.com/index.php/login, it's displaying without any error.

I want to use URL without index.php in that because by adding index.php in URL, CSS and JS files are not including in the page.

Dylan Wheeler
  • 6,928
  • 14
  • 56
  • 80
Omkar
  • 298
  • 5
  • 27
  • Do you have [mod_rewrite](http://stackoverflow.com/questions/869092/how-to-enable-mod-rewrite-for-apache-2-2) enabled on the server? – Samsquanch Jul 13 '16 at 15:39
  • @Samsquanch. I don't know. But If not then how to check it and how to enable it? – Omkar Jul 13 '16 at 15:40
  • @Omkar http://stackoverflow.com/questions/7337724/how-to-check-whether-mod-rewrite-is-enable-on-server http://stackoverflow.com/questions/9021425/how-to-check-if-mod-rewrite-is-enabled-in-php – HongKilDong Jul 14 '16 at 11:22

1 Answers1

0

the problem probably in your server configuration or .htaccess

I've just encountered the same problem, for me enabling mod_rewrite for apache2 fix it.

You should probably read:

https://laravel.com/docs/5.0/configuration#pretty-urls

Can't route properly in Laravel

Can't access URL in Laravel routes

Community
  • 1
  • 1
Rizky Arlin
  • 373
  • 1
  • 11