Laravel routes go directly to folder and file
I am using Laravel 4.2 for a web application. Everything was fine in my localhost, but when I uploaded my app to the server the laravel routes didn't work.
For example, I go to site.com/ and it opens a website, but when I go to site.com/some_route it tries to give me 500 internal servers on the screen and in the error logs I see File does not exist: site.com / some_route .
Also I can see the laravel internal folders from the browser, I mean if I go to the site.com/app browser the laravel folder will open.
In my main directory I have an empty.htaccess file and in my laravel public folder I have a .htaccess file containing the following codes:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
I really need help here because I'm not very good at .htaccess files and servers, so I'm stuck for hours. Thanks you
source to share
It looks like you are trying to deploy to a shared hosting server.
How to deploy laravel 4.2 on shared hosting? can help you if you are on shared hosting.
source to share