Created
January 8, 2017 14:25
-
-
Save BananaAcid/2f44ae49cd50d2a9383e8e8b899cf3fe to your computer and use it in GitHub Desktop.
Subdomain mapping within htaccess
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
# Nabil Redmann 2017 | |
# | |
# assumed: this htaccess is within htdocs/ | |
# | |
# dev.* mapping to ./dev/ | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} ^(www\.)?dev.domain.tld [NC] | |
RewriteCond %{REQUEST_URI} !^/dev(/.*)?$ | |
RewriteRule ^(.*)$ dev/$1 [L] | |
RewriteCond %{HTTP_HOST} ^(www\.)?dev.domain.tld [NC] | |
RewriteCond %{REQUEST_URI} ^/dev(/)?$ | |
RewriteRule ^(.*)$ dev/index.php?$1 [L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment