Created
August 2, 2020 13:51
-
-
Save om-mahato/315272a9925b4974ef33b69cbf4bd7ac to your computer and use it in GitHub Desktop.
Apache .htaccess file to redirect all trafic to public folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#.htaccess | |
RewriteEngine On | |
RewriteBase /My-Project/ | |
RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC] | |
RewriteRule ^ %1 [L,NE,R=302] | |
RewriteRule ^((?!public/).*)$ public/$1 [L,NC] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment