Last active
December 22, 2015 23:49
-
-
Save Orangetronic/6549372 to your computer and use it in GitHub Desktop.
Helpful mod_rewrite snippets:
1. Apache mod_rewrite rule to fake virtualhost in shared hosting environments where apache config files are not accessible.
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
RewriteCond %{HTTP_HOST} ^mydomainname\.com$ [OR] | |
RewriteCond %{HTTP_HOST} ^www\.mydomainname\.com$ | |
RewriteCond %{REQUEST_URI} !^/subfoldername/ | |
RewriteRule (.*) /subfoldername/$1 | |
#from http://stackoverflow.com/a/11090555/2776197 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment