Created
December 17, 2014 15:19
-
-
Save tsu84/09588e690bbb0924bcf9 to your computer and use it in GitHub Desktop.
Redirect HTTP from root to subdirectory
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
#setting for mysite.com linking to /subdir | |
RewriteEngine on | |
RewriteBase / | |
# Avoid Loop on directory | |
RewriteCond %{REQUEST_URI} !^/subdir/ | |
# Rewrites all URLS [Replace "domain" with the actual domain, without the TLD (.com, .net, .biz, etc)] | |
RewriteCond %{HTTP_HOST} ^(www\.)?mysite.com\. | |
# Rewrite all those to insert /folder | |
RewriteRule ^(.*)$ /subdir/$1 [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment