|
|
> Hi,
>
> I believe this must have been asked several times, but I can't find
> the answer in the archives.
>
> There is a 3Com 812 ADSL router between my computer and internet.
> Recently, I bought a domain name (let's call it test.com (NOT the real
> case)). I made personal.test.com to point to my IP public address,
> which is 80.35.x.x. My private IP address is 192.161.0.10. My PC has a
> web server listening at port 12000, and the router maps 80.35.x.x:80
> to 192.161.0.10:12000.
>
> When someone external to my LAN types
> http://personal.test.com/index.php in their browers, it works OK for
> them. However, when, from inside my LAN, I type the same, I get an
> error saying the page does not exist. If I type
> personal.test.com">http://personal.test.com, I get the configuration page of my router.
>
> For me to test my pages, I must replace "personal.test.com" by
> "localhost:12000", and then everything works. Of course, I would like
> to have code that would work for everyone, independently on whether
> the person browsing is inside or outside my LAN. How can I do this?
As you said, your router maps 80.35.x.x:80 to 192.161.0.10:12000. What
it doesn't do is to map 127.0.0.1:80 to 192.161.0.10:12000, or
192.161.0.10:80 to 192.161.0.10:12000. I think this is your trouble.
Within your LAN, a DNS lookup to personal.test.com is being resolved to
either 127.0.0.1 or 192.161.0.10, not 80.35.x.x. So the router doesn't
do its mapping.
|
|