Setting up a 301 redirect via htaccess

Usually 301 redirection used to redirect website from  one to anther website. If you had an old domain such as digitalzix.in, and now you decided you actually want to use digitalzix.com for the website.

You can setup a 301 redirect for the entire domain, so that old links will redirect to digitalzix.com.

 RewriteEngine on
RewriteCond %{HTTP_HOST} ^digitalzix.in [NC,OR]
RewriteCond %{HTTP_HOST} ^www.digitalzix.in [NC]
RewriteRule ^(.*)$ http://dgitalzix.com/$1 [L,R=301,NC]

1 Comments

Write a Comment

Your email address will not be published.