Created
November 16, 2016 09:37
-
-
Save joviczarko/3acbf4c32f199e2d69d304d180b278de to your computer and use it in GitHub Desktop.
Domain redirection from the apache virtual hosts file
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
<VirtualHost *:80> | |
ServerName www.domain1.com | |
ServerAlias domain1.com | |
Redirect / http://www.domain2.com | |
</VirtualHost> | |
<VirtualHost *:80> | |
ServerName www.domain3.com | |
ServerAlias domain3.com | |
Redirect 301 / http://www.domain2.com | |
</VirtualHost> | |
<VirtualHost *:80> | |
ServerName www.domain2.com | |
ServerAlias domain2.com | |
. | |
. | |
. | |
</VirtualHost> | |
https://www.digitalocean.com/community/tutorials/how-to-create-temporary-and-permanent-redirects-with-apache-and-nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment