1RewriteEngine On
2
3RewriteCond %{REQUEST_FILENAME} -d [OR]
4RewriteCond %{REQUEST_FILENAME} -f
5RewriteRule ^ ^$1 [N]
6
7RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
8RewriteRule ^(.*)$ public/$1
9
10RewriteCond %{REQUEST_FILENAME} !-d
11RewriteCond %{REQUEST_FILENAME} !-f
12RewriteRule ^ server.php
1Rename server.php in your Laravel root folder to index.php
2Copy the .htaccess file from /public directory to your Laravel root folder.
1RewriteEngine On
2RewriteCond %{REQUEST_URI} !^/public/
3RewriteRule ^(.*)$ /public/$1 [L,QSA]
1// Larave remove /public/ from URL
2<IfModule mod_rewrite.c>
3 RewriteEngine On
4 RewriteRule ^(.*)$ public/$1 [L]
5</IfModule>