Permanent redirect (301) with .htaccess

To set a permanent redirection from with and to, the following code shall help you

RewriteEngine on

RewriteCond %{HTTP_HOST} ^example\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^(.*)$ “http\:\/\/example1\.com\/$1″ [R=301,L]

Just put the above code in the .htaccess file  under by replacing the domains as per your need and check the website..

Check Also

Linux Restricted Shells: rssh and scponly

Restricted shells like rssh and scponly give sysadmin the possibility to limit the operations that …