Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

locaalhost vs 127.0.0.1

 
Shay Gaghe
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
In developing a server based program I use http://127.0.0.1 to refer the object sources , I know the �localhost� does smilar thing but im not sure. Can you all expose a little more about it ?
Thank in advance
Shay
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"localhost" is basically a user friendly name for the IP address 127.0.0.1. It shouldn't matter which one you use.
Matthew Phillips
 
Shay Gaghe
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok..i thought so..but how can i changhe it or in other words to reffer it to other place in the file system?
thanks
Originally posted by Matthew Phillips:
"localhost" is basically a user friendly name for the IP address 127.0.0.1. It shouldn't matter which one you use.
Matthew Phillips

 
Marilyn de Queiroz
Sheriff
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http:\\localhost\< filename >
 
Shay Gaghe
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Marilyn deQueiroz:
http:\\localhost\< filename >

thanks for your reply
i mean.. the "localhost" in my computer reffer to the ASP engine root directory , i want that the "localhost" will reffer to C:/images how can i set it?
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
'localhost' is like a java language keyword, only in networking.

localhost refers to the root of the webserver that is running on the machine in which you type 'localhost', most likely IIS. IIS, when it receives a request for an .asp page, will retrieve the file from the filesystem, run it through asp.dll, and then serve the results.

If you want a single word to refer to a place on your harddrive, then you need to investigate aliases. I know you can do this with Tomcat, iWS, etc... not sure of how to do the same in IIS.
 
Marilyn de Queiroz
Sheriff
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It can be done in IIS. However it's kinda complicated and I don't have access to my IIS box right now. You need to create a "virtual directory". It's an IIS (or whatever server you are using) thing, not a Java thing.

[This message has been edited by Marilyn deQueiroz (edited September 21, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic