Skip to content

Instantly share code, notes, and snippets.

@imownbey
Created June 10, 2009 21:04
Show Gist options
  • Save imownbey/127499 to your computer and use it in GitHub Desktop.
Save imownbey/127499 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com dev.example.com
DocumentRoot /path/
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(dev.)?example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment