Skip to content

Instantly share code, notes, and snippets.

@lukewhitehouse
Created September 9, 2016 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukewhitehouse/2da99c2c324b070cb6bc4dd44c767e2d to your computer and use it in GitHub Desktop.
Save lukewhitehouse/2da99c2c324b070cb6bc4dd44c767e2d to your computer and use it in GitHub Desktop.
301 Redirects stuff
# Redirect entire site from old to new domain
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$
RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L]
</IfModule>
@lukewhitehouse
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment