×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: Web Designer
Added: Sep 13, 2017 1:16 PM
Views: 6
.htaccess redirect all pages to new domain
  1. # .htaccess redirect all pages to new domain
  2.  
  3. RewriteEngine on
  4. RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
  5.  
  6. # Example:
  7. # www.example.net/somepage.html?var=foo redirects to www.example.com/somepage.html?var=foo