Last active
August 29, 2015 14:03
-
-
Save bostondv/ad8ab2c4eb782de022cc to your computer and use it in GitHub Desktop.
.htaccess main domain to subdirectory redirect
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 main domain to subdirectory redirect | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ | |
RewriteCond %{REQUEST_URI} !^/web/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ /web/$1 | |
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ | |
RewriteRule ^(/)?$ web/index.php [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment