Answer the question
In order to leave comments, you need to log in
How to remove public from site url?
Hello.
Periodically (or so it seems to me) when going to the main page of a site written in Laravel 5.4, there is a redirect according to the rule "mysite.ru" to "mysite.ru/public/".
How to fix the problem?
Answer the question
In order to leave comments, you need to log in
You can create .htaccess at the root
RewriteEngine on
RewriteRule (.*) /public/$1 [L]
Make sure the .htaccess at the address public_html/public/.htaccess
matches GitHub
in short -
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question