Answer the question
In order to leave comments, you need to log in
How to configure .htaccess for laravel if it's in a subfolder?
The project is deployed on the hosting in the subfolder example.com/folder
How to write in .htaccess that he would remove public from the URL, but also take into account that it is in a subfolder?
Also index.php in public doesn't want to run by default.
Now at the root of example.com/folder is .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question