Skip to content

Instantly share code, notes, and snippets.

@therealkevinard
Last active July 25, 2016 16:57
Show Gist options
  • Save therealkevinard/9968af5ac2a340910f0facd3e4e0a2a1 to your computer and use it in GitHub Desktop.
Save therealkevinard/9968af5ac2a340910f0facd3e4e0a2a1 to your computer and use it in GitHub Desktop.
dev-to-live 301: after launching dev domain 301 all requests to the live domain. Don't rely on this for link-fixing. Rather, use it after link-fixing to catch any edge cases.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^dev.domain.net [NC]
RewriteRule ^(.*)$ http://www.livedomain.com/$1 [L,R=301,NC]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment