how to set primary domain if 2 domain point to same host

Using a single web hosting account to host multiple sites

how to set primary domain if 2 domain point to same host

Postby huyhoa » Tue Sep 18, 2007 6:57 pm

I have two domains like 123.com and 456.com
Domain 456.com hosted and 123.com is parked for 456.com
So, now i want when people go to 123.ccom and 456.com it alway change to 123.com and still hosted domain 456.com and 123.com for parked.
Please help me.Thanks
huyhoa
 
Posts: 35
Joined: Tue Nov 28, 2006 2:25 am

Postby richardk » Wed Sep 19, 2007 12:08 pm

Do both domain's show the same content?

Try the following in a .htaccess file in your document root
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.123\.com$ [NC]
RewriteRule .* http://www.123.com%{REQUEST_URI} [R=301,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 23 guests

cron