.htaccess 301 redirect from old domain to new domain while structure of pages and url are same
snippet in htaccess

.htaccess 301 redirect from old domain to new domain while structure of pages and url are same

user1687

    RewriteEngine On

    # Redirect Entire Site to New Domain
    RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
    RewriteCond %{HTTP_HOST} ^another.olddomain.com$ [NC]
    RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]