Laravel htaccess in root directory

Posted by

when you deploy you application on share hosting, you will pull project on public_html, so to access your website you need to add public ,, to resolve this you have to add file .htaccess on root directory which content:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_URI} !^/public/ 
RewriteRule ^(.*)$ /public/$1 
#RewriteRule ^ index.php [L]
RewriteRule ^(/)?$ public/index.php [L] 
Click to rate this post!
[Total: 1 Average: 5]

Leave a Reply

Your email address will not be published.