I have a client who has their main domain (x.com
) through Network Solutions. They also have registered y.com
and y.org
, but this time through Media Temple (no hosting on either domain). What they're asking me to do is make http://y.{com,org}
use the files at http://x.com/y
. The hosting package on x.com
is a VPS with full root access. I'm not sure where to start with this one. Any ideas?
Asked
Active
Viewed 780 times
1

sdellysse
- 203
- 2
- 8
1 Answers
3
Point all DNS towards the x.com VPS (just copy the DNS-settings from x.com and change the domain). Then alter your config accordingly on the VPS.
You could catch all of the domains using Virtual Hosts in Apache, like that the same content would be served to all of them.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.x.com
ServerAlias x.com *.x.com
DocumentRoot /www/whatever
</VirtualHost>
<VirtualHost *:80>
ServerName www.y.com
ServerAlias y.com *.y.com
DocumentRoot /www/whatever
</VirtualHost>
It is possible, but I wouldn't recommend it, google for one, does not like mirror-domains. You are better off making a redirect from y.{org,com} to x.com.
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.y\.com$ [NC]
RewriteRule ^(.*)$ http://www.x.com/$1 [R=301,L]

Bart De Vos
- 17,911
- 6
- 63
- 82