.htaccess redirect from site root to public folder, hiding "public" in URL?
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]
Add the following to the first line of your .htaccess
DirectoryIndex public/index.php public/index.html