Laravel 4 removing public from URL

Easiest way is create .htaccess file in your Laravel root with following content:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

It should be redirected easily.

Reference: https://coderwall.com/p/erbaig/laravel-s-htaccess-to-remove-public-from-url

Leave a Comment