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
  3. RewriteEngine on
  4. RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
  5. RewriteRule .*{REQUEST_URI} [R=301,L]

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.