DavidiusK
asked on
Disable virtual directory browsing when pointing the site to the VD
In IIS 7/Server 2008 is there a way of stopping a user browsing a virtual directory when the site at the level above is pointing to it.
For example;
When I add a Virtual directory to a server its URL would be;
http://HOSTNAME/VIRTUALDIRECTORYNAME/default.aspx
But by changing the site to point to the physical folder of the virtual directory users are able to browse the site without entering the virtual directory name.
http://HOSTNAME/default.aspx
When I enable the latter by changing the site’s physical path is there a way of disabling browsing via the virtual directory name. Or driving users to the new http://HOSTNAME/default.aspx URL?
For example;
When I add a Virtual directory to a server its URL would be;
http://HOSTNAME/VIRTUALDIRECTORYNAME/default.aspx
But by changing the site to point to the physical folder of the virtual directory users are able to browse the site without entering the virtual directory name.
http://HOSTNAME/default.aspx
When I enable the latter by changing the site’s physical path is there a way of disabling browsing via the virtual directory name. Or driving users to the new http://HOSTNAME/default.aspx URL?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If so remove the virtual directory and create a real directory with the same name. Then you can just change the properties of your virtual directory so it send back a redirect instead. From the IIS manager select your folder and then open "HTTP Redirect", it should be straight forward from this point on.