Mobile app version of vmapp.org
Login or Join
Heady270

: Can I redirect a root site under IIS to a subdirectory, without affecting other applications? I'm running IIS 7.5 on Windows Server 2008R2. I currently run a site at the root of mydomain.edu.

@Heady270

Posted in: #Iis7 #Subdirectory #UrlRewriting

I'm running IIS 7.5 on Windows Server 2008R2.

I currently run a site at the root of mydomain.edu. I also have a variety of applications (e.g., mydomain.edu/calendar, mydomain.edu/research, mydomain.edu/otherapp) running on the server.

I would like to move the root site to a subdirectory (i.e., mydomain.edu/sub) to logically separate the root site's content from the other applications, but have traffic from mydomain.edu point to mydomain.edu/sub.

Is this feasible without displaying 'sub' in the path?

For example, all pages should continue to display mydomain.edu/regularpage.htm or mydomain.edu/directory/page.htm NOT mydomain.edu/sub/regularpage.htm or mydomain.edu/sub/directory/page.htm).

Can exclusions be added so as not to affect the other applications?

I don't know if this is a fairly standard request and I am over-thinking this, or if this is a terrible idea that I absolutely should not consider.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Heady270

1 Comments

Sorted by latest first Latest Oldest Best

 

@Deb1703797

If all you are doing is moving the files on your file system to another location but want to keep the same URL structure, rather than setting up URL Rewrite rules you can change the physical path of your IIS website configuration.

I will make the following assumptions:


You are running website "mydomain.edu" from a physical location such as C:inetpubwwwroot.
Your sub applications are running in directories such as C:inetpubwwwrootcalendar, C:inetpubwwwrootresearch, etc.


To change the physical path on the website:


Right click on the website and select 'Manage Web Site...Advanced Settings.'
Change the 'Physical Path' property to 'C:inetpubwwwrootsub' (or the folder name of your choice).
If your other applications are only folders in IIS and are not defined as either virtual directories or applications, you may need to set those up so that the virtual directory points to the appropriate physical path as well. The physical path for the virtual directory can be found in the same way as the website.


Changing the physical path will not have a performance impact. Hope that helps.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme