I am trying to deploy Laravel on Amazon EC2 (Linux AMI). I add .htaccess
in the larval
directory and laravel/public
directory.
<IfModule mod_rewrite.c>
WriteEngine On
RewriteBase /laravel/public/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
When I browser the http://www.mydomaine.com/laravel/public
, the laravel first page works well, but when I browser into a sub page like http://www.mydomaine.com/laravel/public/login
, a 404 Not Found
error appears. How to solve this problem, thanks for your help !