Created
June 17, 2015 14:10
-
-
Save mwender/8fc1c7629d4ef424d67d to your computer and use it in GitHub Desktop.
Redirect all domain aliases to one with these .htaccess rules.
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
RewriteEngine On | |
# If the hostname is NOT www.domain.com | |
RewriteCond %{HTTP_HOST} !^www\.domain\.com$ | |
# 301 redirect to the same resource on www.domain.com | |
RewriteRule (.*) http://www.domain.com/$1 [L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment