4 months ago

Cannot remove public folder from url in laravel 5.7 or more

Posted 4 months ago by Faisal

I am using Laravel 5.7 and i am trying to remove public folder from url through .htaccess. But it is not working This is my .htaccess file in root folder

<IfModule mod_negotiation.c>
    Options -MultiViews

RewriteEngine On

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

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

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

and it is smoothly working in another system

Please sign in or create an account to participate in this conversation.