How to redirect example.com to ww1.example.com

NimaZeynali

Regular Member
Joined
Dec 16, 2020
Messages
344
Reaction score
134
Hi all ,
how movie streaming sites do this? they redirect all of their links to a subdomain (301) then start ranking again?
do we have a code for this?

thanks
 
Its impossible to do this via HTML...

You need to add this to your .htaccess file:
Apache config:
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule (.*) https://ww1.example.com/$1 [R=301,L]
 
Its impossible to do this via HTML...

You need to add this to your .htaccess file:
Apache config:
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule (.*) https://ww1.example.com/$1 [R=301,L]

Does 301 redirect keep all website rankings?
 
Back
Top