Solved

Disable virtual directory browsing when pointing the site to the VD

Posted on 2010-09-02
2
746 Views
Last Modified: 2012-05-10
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?
0
Comment
Question by:DavidiusK
2 Comments
 
LVL 1

Expert Comment

by:Noggin182
ID: 33588172
If I understand you right you want to force users that are still trying to access /vdir/file to be redirected to /file?

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.
0
 

Accepted Solution

by:
DavidiusK earned 0 total points
ID: 33840602
I figured it out an appication can be set at the website level.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now