So, I just upgraded to Laravel 4, and I'm setting it up on a new server. The default route / works fine, but every other route returns a 404 error. When I try index.php/route I get the requested data, so this means .htaccess is not working.
Yes, AllowOverride is set to ALL .
Yes, I enabled the mod_rewrite module .
I tried the following 3 combinations .htaccess:
<IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </IfModule>
and
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>
and
Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L]
And after rebooting the server, etc. none of them work, and I'm still returning 404 error.
Note. I use several domains with the same laravel setting, so my public folders are public/site1 , public/site2 , public/site3 . However, I am directing public paths to these folders, so I'm not sure if this will be a problem.
Any thoughts?
.htaccess laravel laravel-4
Dalton Gore Jun 04 '13 at 7:29 2013-06-04 07:29
source share