Skip to content

Instantly share code, notes, and snippets.

@lizardking8610
Created May 18, 2017 17:23
Show Gist options
  • Save lizardking8610/a228de946b615112cba17d40bdaf3ff7 to your computer and use it in GitHub Desktop.
Save lizardking8610/a228de946b615112cba17d40bdaf3ff7 to your computer and use it in GitHub Desktop.
HTAccess: 301 redirect
Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html
Redirect 301 /oldpage2.html http://www.yoursite.com/folder/
Redirect 301 / http://newsite.com/
/* This way does it with links intact. That is www.oldsite.com/some/crazy/link.html will become www.newsite.com/some/crazy/link.html. This is extremely helpful when you are just "moving" a site to a new domain. Place this on the OLD site */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment