Sujono
Sujono

Reputation: 11

Laravel 6 : Remove Public from URL using htaccess

All

I want to remove public from url using htaccess, i've tried many ways but it doesn't work in laravel 6. The latest i'm using this way : https://hdtuto.com/article/laravel-remove-public-from-url-using-htaccess

But same result, any sugestion ?

Upvotes: 0

Views: 4462

Answers (1)

Sujono
Sujono

Reputation: 11

SOLVED !!!

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

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 ^ index.php

source : How to remove public from laravel url

Upvotes: 1

Related Questions