<anilgkonline@gmail.com> wrote in message
news:1177995187.753347.92910@h2g2000hsg.googlegrou ps.com...
>I have a local http server on which i am hosting some webpages on a
> private network.
> My application tries to access a website on the internet, for example:
> "http://groups.google.com/group/alt.privacy.spyware/post?hl=en"
>
> Now i want my host file to map this URL (http://groups.google.com/
> group/alt.privacy.spyware/post?hl=en) to my local webpage.
>
> Is this possible using the hosts file.
>
> I have tried to give something like,
>
> 10.0.1.100 http://groups.google.com
>
> when i type groups.google.com in my web browser it tries to connect to
> 10.0.1.100
>
> Similarly when i give
>
> 10.0.1.100
> http://groups.google.com/group/alt.p...are/post?hl=en
>
> it tries to connect to some other ip for example: 64.233.179.99



The hosts file only equates hostnames (FQDN or just hostnames) to IP
addresses. Paths on those hosts are not involved and cannot be
specified. All you can specify are hosts.

So why not have the page navigate to the owner's site rather than trying
to pretend it is your content? If you want to ensure the user remains
on your domain while navigating to another site, why not show that other
site's page in a frame? Looks like you are trying to steal someone
else's content.

Google does work.
http://www.unet.univie.ac.at/aix/fil...iles/hosts.htm
http://en.wikipedia.org/wiki/Hosts_file