Redirect old domain to new domain with htaccess

PHOTO EMBED

Mon Aug 29 2022 12:01:25 GMT+0000 (UTC)

Saved by @lancerunsite #wordpress #htaccess #apache2


    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
      RewriteCond %{HTTP_HOST} ^www.olddomain.com$
      RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L]
    </IfModule>

content_copyCOPY