• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 608
  • Last Modified:

IIS7 Redirect Base URL to Subdirectory page?

Hello all,

I have a asp.net 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.
  • 3
  • 3
1 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

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'
sbornstein2Author Commented:
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.
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

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

Good luck.
sbornstein2Author Commented:
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)
Hi! You can put custom redirection logic in global.asax of your application.
Follow this example:
sbornstein2Author Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now