|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Q about IIS virtual directory
I'm just beginning asp.net. I have versions 1.1 and 2.0 installed on my Win XP Pro desktop. I've successfully installed IIS. I've set up a virtual directory to receive my html files.
Problem is, I was led to believe that installing a virtual folder would eliminate the need to include my computer's name in the URL. For example, my computer's name is "home." My virtual directory name is "Rick." In order to get my indx.html to display, I have to type in http://home/Rick/index.html. If I type in just http://Rick/index.html, I get 404'd. Is this the way IIS is supposed to work, or am I doing something wrong? (Frankly, so far, I like Apache better, but I hope things improve with IIS. Thanks for your help. |
|
#2
|
||||
|
||||
|
Quote:
You should be able to do http://localhost/rick/
__________________
Raid1 in XP Pro My open source projects: ------------------------ Blobber - Add images as blobs to SQL Server ------------------------ |
|
#3
|
||||
|
||||
|
If you wanted to get it from http://rick/index.html, you'd need to add a new entry to your hosts file (containing rick and your IP address), add a new host header value for the site and move the files out of the current virtual directory into the main root directory.
|
|
#4
|
|||
|
|||
|
Quote:
I'm assuming the hosts file is the one that contains the localhost 127.0.0 and I'm also guessing that my virtual host would be rick 127.0.0 But I just tried http://rick/index.html after updating my hosts file and it doesn't work. Sorry, but I don't understand what you mean by adding a new host header value for the site (which is merely a home server site), and I'm sure you can't mean that I should move all my web files to my main root directory of C:\. So, ok, let me guess: I have to go into Control panel, bring up the IIS Manager and the enter "rick" where it says headers? There is also an entry of my ip address for my cable provider. Is that the ip address you're referring to? And by root directory, do you mean the root for the "default web site?" Backtracking through "default website" led me to a folder called "inetpub." Is that the one you mean? I should move my "rick" directory from C:\rick to C:\inetpub\rick? Could you elaborate a little more, please? Thanks very much for you help, everyone. |
|
#5
|
|||
|
|||
|
Whats the ip of the server? If say its 192.168.16.1 go to http://192.168.16.1/ you should see the default IIS page. Changes to hosts need a reboot.
On the command line do C:\ping localhost and show up the output. |
|
#6
|
||||
|
||||
|
Quote:
Correct, but the entry you actually want is: Code:
127.0.0.1 rick (The IP address should be 127.0.0.1 and it goes IP address then host name) Quote:
Open the IIS Manager, right-click your website and click Properties. In the Web Site tab, click the Advanced button in the "Web site identification" section. You'll be displayed a list of the current identities of your website. There will probably be only one record, containing "Default" for the IP address, 80 for the port and the host header value will be blank. Click the Add button. Leave the IP address set to "All unassigned", enter 80 in the port and for the host header value enter "rick". What you've done so far is create a host name called rick which resolves to your own computer. You've then told IIS that you also want to make the website available on the host name called "rick", as well your current computer name and localhost. So, now when you go to http://rick/ you will be displayed the current contents of your home directory (probably the files from C:\Inetpub\wwwroot). If you were to go to http://rick/Rick/index.html (because you created a virtual directory called Rick) you'd get your homepage. But because you don't want to include the virtual directory name Rick, you'd want to move your files to C:\Inetpub\wwwroot, so that they're displayed when you bring up http://rick/index.html. I hope that makes some sense. |
|
#7
|
|||
|
|||
|
Mr. edwinbrains, you are my hero. Thanks a bunch. Be back later.
|
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > Q about IIS virtual directory |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|