Knowledgebase

Understanding Physical and Virtual Directory Structures

Beyond home directory wwwroot, Microsoft Web sites also use the following:
■ Physical directories
■ Virtual directories
The difference between physical and virtual directories is important. A physical
directory is part of the file system, and to be available through IIS, it must exist as a
subdirectory within the home directory. A virtual directory is a directory that isn’t
necessarily contained in the home directory but is available to clients through an alias.
Physical directories and virtual directories are configured and managed through the
IIS Manager, but they’re displayed differently.
Both physical and virtual directories have permissions and properties that you can set
at the operating system level and the IIS level. You set operating system permissions
and properties in File Manager dialog boxes in Control Panel. You set IIS permissions and
properties in your website properties in CP.

You create physical directories by creating subdirectories within the home directory by
using File Manager. For example, you create a Web site with the
DNS name www.yoursite.com. Users are able to access the Web site by using the
URL http://www.yoursite.com/. You then create a subdirectory within the home
directory called “firstsubdirectory.” Users are able to access the subdirectory by using the URL path http://www.yoursite.com/firstsubdirectory/.

Even though locating your content files and directories within the home directory
makes it easier to manage a Web site, you can also use virtual directories. Virtual
directories act as pointers to directories that aren’t located in the home directory. You
access virtual directories by appending the directory in Virtual directory tab for the site properties.
If, for example, your home directory is C:\HostingSpaces\youraccountname\yoursitename\wwwroot, and your pages or documents in C:\HostingSpaces\youraccountname\yoursitename\wwwroot\firstsubdirectory\seconddirectory, you would need to create a virtual directory that points to the actual seconddirectory location. Visitors to the www.yoursite.com web site could access the directory by using the URL path http://www.yoursite.com/seconddirectory/.



Was this answer helpful?

 Print this Article

Also Read

How to clean MS SQL 2008 transaction log file

Please login to Mylittleadmin in websitepanel and execute this acript against your database: USE...

How to send email from your asp.net code?

' Visual Basic Sample - Sending SMTP Authenticated E-mail ' Please replace yourdomain.com in...

I get Error reading web site information when i click my website in Websitepanel

A) this usually means that eithera) you have deleted wwwroot/web.configb) edited...

How to Take Database Offline - Take Database Online

  You can use this TSQL script in new query under your DB   -- Take the Database Offline...