HTACCESS - Redirect Old Domain to New Domain


/ Published in: Apache
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Options +FollowSymLinks
  2.  
  3. RewriteEngine on
  4. RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
  5. RewriteRule .* http://www.newdomain.com%{REQUEST_URI} [R=301,L]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.