Without your web server configuration, it's difficult to say.
If, for example, you have set up multiple virtual hosts, you may get a redirect for a remote address, while addressing directly by IP on your LAN might take you to a default page.
On nginx, for example, if you had the following:
Code: Select all
listen 80 default_server;
listen 80 ;
If you went to 192.168.1.50 or whatever IP your Pi lives on, it would be handled by the first block. If you went to externaldomain.com, it would be handled by the second block. If these are different directories, then there you have it. If you are unsure, make sure to check in the config file nginx.conf, or for apache look at apache2.conf and ports.conf.
A similar situation as above also applies to virtual hosts in any other server such as Apache.