On Nov 24, 2010, at 3:04 PM, LuKreme wrote:
> Not specifically an OS X question, but it is my MacPro I am futzing with.
>
> There is a site xxx.tld and I want all web requests to instead be redirected
> to yyy.tld. I know I can block all access to xxx.tld in /etc/hosts, and I can
> redirect IP addresses (which I do with the various CDDB IPs), but if I try to
> connect to xxx.tld and I use /etc/hosts to redirect the web request to the IP
> for yyy.tld, yyy.tld will not load the right pages since the name doesn't
> match what it is expecting.
This is typical of hosts that perform multi-domain hosting over a single public
IP address. The addressing is out of your control -- any request to yyy.tid
that isn't associated with a recognizable host name at their end gets processed
as an exception. (Hosts that don't do multi-domain hosting will work fine with
this type of redirection in your local hosts file.)
I was going to suggest that many multi-domain hosts also allow the syntax
sitename.hostingcompanyname.com for sitename.com and it might have a unique
public IP... but I just tried it at my own provider and it doesn't work.
Curiously, for each site, the IPs for the two different forms are different,
but all IPs of the same form resolve to the same IP. (I can't imagine what the
utility of that is.)
To make what you want to do work, you not only have to modify the outgoing IP
address, but it looks like you have to modify the environment information sent
by your browser. I don't see this happening short of writing a full proxy
service.
--
Macs R We -- Personal Macintosh Service and Support
in the Wickenburg and far Northwest Valley Areas.
http://macsrwe.com
_______________________________________________
MacOSX-talk mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/macosx-talk