How do I redirect one domain to another? Print

  • 0

Place this meta script in your page you want to redirect: 

meta http-equiv="refresh" content="0;url=http://WWW.DOMAIN_NAME.COM/INDEX.HTM(L)"

(Change WWW.DOMAIN_NAME.COM to the other domain name and INDEX.HTM(L) to the name of the other domain's index file. Surround the script with right-left arrows<>.)

You can also use .htaccess to redirect the domain by placing the following in the .htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://WWW.DOMAIN_NAME.COM/$1 [R=301,L]

(Create the file if it does not exist in the root folder of the old website (where the index file is located) and change WWW.DOMAIN_NAME.COM to the other domain name.)

Kas see vastus oli kasulik?

« Tagasi