The Art of Writing Short Stories Read Here

Redirect Old Domain to New Domain via .htaccess

 Usually we develop the site on developement or subdomain and when we finally mirgate the to new domain then some of thing will remain or page redirect happens in  sometimes , so In this case .htaccess file helps to redirect all your olddomain pages to new one 

Below is the code will helps to redirect the olddomain to new domain, should be written in .htaccess file on your root folder

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^$ [OR]
  RewriteCond %{HTTP_HOST} ^$
  RewriteRule (.*)$$1 [R=301,L]

Hopes this articles helps, thanks

You may also like :