For Laravel 5:
Follow steps below to remove "public" word from URL,
1) Rename the server.php in the your Laravel root folder to index.php
2) Copy .htaccess file from /public directory to your Laravel root folder.
3) Changing .htaccess file as follows for statics:
If there are any other static files needed just add the extension to the previous declared list
And now its done!!!
Follow steps below to remove "public" word from URL,
1) Rename the server.php in the your Laravel root folder to index.php
2) Copy .htaccess file from /public directory to your Laravel root folder.
3) Changing .htaccess file as follows for statics:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(css|js|images)/(.*)$ public/$1/$2 [L,NC]
If there are any other static files needed just add the extension to the previous declared list
And now its done!!!