Last active
December 8, 2018 17:30
-
-
Save martiuh/746f00746d23b5fe02f02fb374cacd9e to your computer and use it in GitHub Desktop.
.htaccess root as folder
This file contains 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
# Map http://www.example.com to /public. | |
RewriteRule ^$ /public/ [L] | |
# Map http://www.example.com/x to /public/x unless there is a x in the web root. | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} !^/public/ | |
RewriteRule ^(.*)$ /public/$1 | |
# Add trailing slash to directories within public | |
# This does not expose the internal URL. | |
RewriteCond %{SCRIPT_FILENAME} -d | |
RewriteRule ^public/(.*[^/])$ http://curiontas.com/$1/ [R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment