Laravel htaccess on MAMP Remove the Public Folder Route

Remove the Public route on the Laravel Project when working in MAMP without the virtual host setup.

Laravel htaccess Code to remove the /public route from your projects on MAMP and any other environments that you cannot setup or do not want to setup virtual environments. 

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^ ^$1 [N]

    RewriteCond %{REQUEST_URI} (.w+$) [NC]
    RewriteRule ^(.*)$ public/$1 

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ server.php


Watch My Short Video Tutorial: