|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (10 bit)
Join Date: May 2000
Location: New Zealand
Posts: 546
|
Out of Interest: Protocols / Local Host
Hi,
This is just out of interest, inspired by another post here. Why dos it not work if I put this in my IE address bar: localhost/default.htm (or 127.0.0.1/default.htm) I created a file called default.htm in my c:\ root folder (actually saved a page from PC Mech without all the graphics etc). I was expecting it to display in IE when I put in the above 'address'. I also tried: http://localhost http://localhost/default.htm file://localhost file://localhost/default.htm None of those worked either. You probably realised that I know little or nothing about this stuff, but they seemed like a logical experiment to play around with! Thanks for humouring me. David. |
|
|
|
|
|
#2 |
|
Forum Administrator
Staff
Premium Member
Join Date: May 2000
Location: Joplin MO
Posts: 37,771
|
You have to have a webserver (IIS, PWS, whatever) running on your machine for it to work that way, and the file has to be in the server's directory structure.
|
|
|
|
|
|
#3 |
|
Member (10 bit)
Join Date: May 2000
Location: New Zealand
Posts: 546
|
So would I be correct in thinking that my browser can 'talk' HTTP, but my PC (serving up the file on my HDD) cannot?
If so, why doesn't the file://127.0.0.1 work either, since I thought I was stipulating that IE not use the HTTP? Feel free to tell me to go away and find a tutorial somewhere! |
|
|
|
|
|
#4 |
|
Premium Member
Join Date: Jun 1999
Posts: 9,231
|
Basically what a webserver also does is, open up a port on your computer, that allows for a browser to access your files. This is typically port 80 (when you type www.pcmech.com you are actually going to a computer that has port 80 open and its www.pcmech.com:80 ).
When typing an address without a webserver you are missing 2 components - one is an identifier for the IP address and the other is the appropriate port. You can try this small & free webserver to see how it would work: http://www.analogx.com/contents/down...work/sswww.htm |
|
|
|
|
|
#5 | |
|
Member (9 bit)
Join Date: May 2000
Location: Lexington, Michigan
Posts: 353
|
Quote:
127.0.0.1 which is really the the local host ip address try file://c:\ and see what you get
__________________
Certifiable =========================================== Cisco CCNA,CCDA CompTIA A+, Network+,Inet+,Security+ CIW Associate IBM AIX certified IBM Certified Specialist - p5 and pSeries Administration and Support for AIX 5L V5.3 IBM Certified Systems Expert - p5 and pSeries Enterprise Technical Support AIX 5L V5.3 |
|
|
|
|
|
|
#6 |
|
Member (10 bit)
Join Date: May 2000
Location: New Zealand
Posts: 546
|
Great!
Thanks guys - as ever, I now have a slightly greater appreciation of just how much I do not know, but that's the kind of inspiration you can't beat! David. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|