Skip to content

Instantly share code, notes, and snippets.

@joviczarko
Created November 16, 2016 09:37
Show Gist options
  • Save joviczarko/3acbf4c32f199e2d69d304d180b278de to your computer and use it in GitHub Desktop.
Save joviczarko/3acbf4c32f199e2d69d304d180b278de to your computer and use it in GitHub Desktop.
Domain redirection from the apache virtual hosts file
<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