htaccess redirect whole website code example
Example 1: htaccess redirect to html page
RedirectMatch 301 ^/blog/about /blog/about.html
Example 2: htacces redirect
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.vecchiodominio\.com$
RewriteRule (.*) http://www.nuovodominio.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^vecchiodominio\.com$
RewriteRule (.*) http://www.nuovodominio.com/$1 [R=301,L]