Skip to content

Instantly share code, notes, and snippets.

@mpezzi
Created March 27, 2012 23:51
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 mpezzi/2221593 to your computer and use it in GitHub Desktop.
Save mpezzi/2221593 to your computer and use it in GitHub Desktop.
.htaccess 301 redirect
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://example.ca/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ http://example.ca/$1 [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment