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

I get error when conneting to MS SQL 2008 server

If you get this error: The server principal " " is not able to access the database " " under the...

How to send email from your asp.net code?

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

Conection String to MS SQL 2008 DB - example

In order to connect to SQL Server 2008 from Management Studio, Enterprise Manager, Query...

MS SQL 2008 and MySQL server addresses

MSSQL 2008 server addresses are: sql2008.aspnethosting.co.uk sql2008r2.aspnethosting.co.uk...

How to enable remote IIS management for my site?

Login to your hosting control panel here http://cp.aspnethosting.co.uk then click on Web - Web...