T
T
Troodi Larson2018-06-26 16:53:22
Laravel
Troodi Larson, 2018-06-26 16:53:22

Public Laravel in address bar?

In root .htaccess

RewriteEngine on
RewriteRule (.*) /public/$1 [L]

Everything is ok, if the request is /home, but if /home/ then the bakery product (bagel) appears again. Something I did not understand how to fix.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Anton, 2018-06-26
@troodi

RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Y
Yan-s, 2018-06-26
@Yan-s

https://yandex.ru/yandsearch?text=htaccess%20larav...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question