Websterz Technology Blog

Free tutorials, Tech News, Source codes, Tweaks and Tips.

Here are the few lines of code you can add into your .htaccess to redirect your old domain to new domain with 301 (permanent redirect) code.

Open .htaccess file in any editor and add following below lines, please replace websterz.pk with your own domain.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^websterz.pk [NC,OR]
RewriteCond %{HTTP_HOST} ^www.websterz.pk [NC]
RewriteRule ^(.*)$ https://websterz.pk/$1 [L,R=301,NC]


That’s all 🙂

Spread the love
See also  Opencart 3.x Image src unknown error

Leave a Reply

Your email address will not be published. Required fields are marked *