Bit of a strange website testing question

Associate
Joined
18 Oct 2002
Posts
1,346
Location
Behind the bike shed
I'm running a web sever in my house for my website and forum which is running fine but my problem is that if I goto the webpage on a computer on my home network the page won't load because the address has to use my external IP address i.e.

http://w.x.y.z:81/mysite/index.htm

and as w.x.y.z is not my internal network IP range the page fails to load.
I have solved this with most buttons buy just having the target as index.htm and leaving out the rest of the address but as they are in the root directory then it's fine. But some places I can't get away from having the whole address.

Is there a was I can tell my pc I'm using to test the page that w.x.y.z should be replaced with the address of my server? i.e.

http://w.x.y.z:81/mysite/index.htm

would become

http://a.b.c.d:81/mysite/index.htm

Thanks
 
You do not want to hard code the IP into your paths. Have a search on google for relative and absolute paths, you'll find a number of useful tutorials which will help you out.
 
Back
Top Bottom