Virtual Directories - long question

Results 1 to 2 of 2

Thread: Virtual Directories - long question

  1. #1
    the other steve Guest

    Default Virtual Directories - long question

    OK,<BR><BR>Serious newbie question here. I&#039;ve got my website set up on my local machine in a virtual directory. c://inetput/wwwroot/mywebsite/index.asp.<BR><BR>However, when I reference the root directory in a hard link:<BR><BR>response.write "&#060;a href=""/subdirectory/anotherpage.asp""&#062;somelinkage&#060;/a&#062;"<BR><BR>My browser goes to the REAL root directory (inetpub/wwwroot/anotherpage.asp) and doesn&#039;t find it. What am I doing wrong? Did I set up my virtual directory wrong or should I only use relative addresses instead of hard addresses?<BR><BR>Second question: therefore, how do I set up my virtual includes?<BR><BR>I have them all in c://inetpub/wwwroot/mywebsite/common/" I had to create a virtual directory called "common" in IIS so the pages could find the virtual includes.<BR><BR>Do I need more than one virtual directory for my website? I&#039;ve created one for every subdirectory, but I know this can&#039;t be correct, though it has worked (except for the minor problem that my application variables don&#039;t work since every page is considered a different app by IIS - bah!).<BR><BR>note: The last computer I programmed was an Apple ][+

  2. #2
    Join Date
    Dec 1969

    Default RE: Virtual Directories - long question

    You reference the virtual directory the same way you would reference any other directory in the website: /virtualdirectory/myfile.asp<BR><BR>Your second question is sorta confusing. You&#039;ve set a virtual directory in: "wwwroot/mywebsite/common/". Why? If the directory is inside your web root directory you don&#039;t have to make it a "virtual directory".<BR><BR>Virtual directories are for linking files and folders that are PHYSICALLY located outside the websites root directory (or folder). An example of this is if my root web was PHYSICALLY located at c:joesweb and I needed to link a folder on D:joesaspstuff I could make the folder a virtual directory, thus including it as part of the website.<BR><BR>Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts