Forum Moderators: phranque

Message Too Old, No Replies

i get redirected to router homepage when i try to access my website

help!

         

hotdog2005

5:09 pm on Jun 21, 2007 (gmt 0)



hi there, this is my first post and its quite a stupid question but its bugging me.
i have made a free .tk domain name and i have registered it to my ip address. i think everybody else who clicks on it can get to my site but i get directed to my router. i have enabled port forwarding to port 80 and to my network ip.
can anybody tell me why this is and how to fix it?

thanks.

jdMorgan

5:22 pm on Jun 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It is because you are asking the router to make an outgoing connection and an incoming connection simultaneously, which it cannot do.

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]

hotdog2005

6:18 pm on Jun 21, 2007 (gmt 0)



wow that was great help, thanks.
could you tell me how to make the hosts files read only cos that would be great

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.