wilded
10/10/2019 - 10:09 AM

Redirect to a different home folder with htaccess

Place this code in /My-Project/.htaccess:

RewriteEngine On
RewriteBase /My-Project/

RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC]
RewriteRule ^ %1 [L,NE,R=302]

RewriteRule ^((?!public/).*)$ public/$1 [L,NC]