Skip to content

Instantly share code, notes, and snippets.

@ahmadawais
Last active August 29, 2015 14:14
Show Gist options
  • Save ahmadawais/f2f68ef6c5052b3b43c0 to your computer and use it in GitHub Desktop.
Save ahmadawais/f2f68ef6c5052b3b43c0 to your computer and use it in GitHub Desktop.
301 redirect for all URLs when you change your base domain
#addthese two lines in the root folder of your old domain inside .htaccess file
RewriteEngine on
RewriteRule (.*) http://newdomain.com/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment