Forum Moderators: phranque
thanks.
The usual solution to to substitute "localhost://" for your domain name, or to use "127.0.0.1://" instead. Both of these refer to "this computer right here," so the router is not involved in the connection.
An alternative is to add a local DNS entry to your computer's "hosts" file, defining 127.0.0.1 as the IP address associated with your domain name. This allows you to refer to your site by its domain name, or perhaps a subdomain like "test.example.com". The "hosts" file is named exactly that - "hosts" with no filetype at all. Its location varies by operating system and OS version, but it's always named just "hosts". It usually contains examples of how to make new entries, and if not, look for the sample file "hosts.sam" in the same directory.
If you wish to access your server from other machines on your local network, edit their hosts files too, but use the network address of the server instead of 127.0.0.1 -- These are usually in the 192.168.0.xx range, or perhaps 10.0.0.xx -- Check your router configuration or use ipconfig to be sure.
It is generally recommended to set the hosts file permissions to "read-only" after editing the file, as it is a frequent target of worms and other malware.
Jim
[edited by: jdMorgan at 5:24 pm (utc) on June 21, 2007]
also, i installed a forum to the server and it never loads properly, it will load with pictures ect for other people from different ip addresses but not for my computer or local computers. i think it might be because i had to set an install url, so if im accessing it from localhost or 127.0.0.1 it doesnt work. do you know whats causing this?
thanks a lot.