Go Back   PCMech Forums > Help & Discussion > Internet, Web Applications, & The Cloud

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 09-18-2002, 06:48 PM   #1
Member (10 bit)
 
David_Jones's Avatar
 
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.
David_Jones is offline   Reply With Quote
Old 09-19-2002, 12:20 AM   #2
glc
Forum Administrator
Staff
Premium Member
 
glc's Avatar
 
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.
glc is offline   Reply With Quote
Old 09-19-2002, 03:14 AM   #3
Member (10 bit)
 
David_Jones's Avatar
 
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!
David_Jones is offline   Reply With Quote
Old 09-19-2002, 07:17 AM   #4
Premium Member
 
Statica's Avatar
 
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
Statica is offline   Reply With Quote
Old 09-19-2002, 07:58 AM   #5
Member (9 bit)
 
Great_One's Avatar
 
Join Date: May 2000
Location: Lexington, Michigan
Posts: 353
Quote:
Originally posted by David_Jones
If so, why doesn't the file://127.0.0.1 work either, !
because you are specifying it to look for a file called
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
Great_One is offline   Reply With Quote
Old 09-19-2002, 02:38 PM   #6
Member (10 bit)
 
David_Jones's Avatar
 
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.
David_Jones is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 03:55 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2