Skip to content

Instantly share code, notes, and snippets.

@petercossey
Created May 14, 2012 11:15
Show Gist options
  • Save petercossey/2693409 to your computer and use it in GitHub Desktop.
Save petercossey/2693409 to your computer and use it in GitHub Desktop.
htaccess redirect
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{http_host} ^original-url.com [nc]
RewriteRule ^(.*)$ http://www.where-you-want-it-to-go.com/ [r=302,nc]
# Redirect domain and all subdomains
RewriteCond %{http_host} ^(.*)original-domain\.com [nc]
RewriteRule ^(.*)$ http://www.new-domain.com [r=302,nc]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment