how to enable 301 .htaccess redirect code example
Example 1: 301 redirect htaccess
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)$ http://domain2.com/$1 [L,R=301,NC]
Example 2: redirect htaccess 301
Redirect 301 /pagename.php http://www.domain.com/pagename.html