IIS7 Redirect Base URL to Subdirectory page?

Posted on 2011-10-19
Last Modified: 2012-06-27
Hello all,

I have a web application in IIS7 that I simply when the user hits the base URL path such as:

I want it to go to:

I have tried redirect and url rewrite in IIS7 but it is not working.
Question by:sbornstein2
    LVL 18

    Accepted Solution

    Have you tried updating the default page to use a 301 redirect?

    <script runat="server">
    private void Page_Load(object sender, System.EventArgs e)
    Response.Status = "301 Moved Permanently";

    Open in new window

    LVL 18

    Expert Comment

    If you have direct access to the machine running IIS, you can try these steps:
    1    In internet services manager, right click on the file or folder you wish to redirect
    2   Select the radio titled "a redirection to a URL".
    3    Enter the redirection page
    4    Check "The exact url entered above" and the "A permanent redirection for this resource"
    5    Click on 'Apply'

    Author Comment

    nap0leon I cant do it actually in the code as I don't have access to the code currently.  I can do something in the web config though or IIS directly.  I think something can be done in the web config with a rule etc. but need a example of using these sample URLs as you have it here in code.
    LVL 18

    Expert Comment

    Bump to make sure you saw my comment that I posted at the same time.

    Good luck.

    Author Comment

    2   Select the radio titled "a redirection to a URL". (I don't see this if I right click the file in IIS7 I only see edit permissions etc under Content View)
    LVL 18

    Expert Comment

    Hi! You can put custom redirection logic in global.asax of your application.
    Follow this example:

    Author Closing Comment


    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    746 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

    18 Experts available now in Live!

    Get 1:1 Help Now