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

How can I redirect IIS 6 Web Site url to a Web site url sub folder ?

How can I redirect IIS 6 Web Site url to a Web site url sub folder ?

www.website.com = www.website/subfolder/home.aspx

Windows 2003 Server IIS 6 SQL server with web application front end.

1 Solution
Create a default.aspx file in the root of the site, and use Response.Redirect to forward the users to the target page.

Best of luck,
Redirect Using IIS
In internet services manager, right click on the file or folder you wish to redirect.
Select the radio titled "a redirection to a URL".
Enter the page that the page will be redirected to.
Check "The exact url entered above" and the "A permanent redirection for this resource".
Click on 'Apply'.

Redirect using Config File
Specify Redirection Url in Web.Config
<Redirection RequestPath="/Config" Target="~Subfolder/Home.aspx"/>

And Use
Response.Redirect("Target", True)
You can easily do it using ISAPI Rewrite Lite v2 using the following rule under its httpd.ini

RewriteCond Host: (?:www\.)?website.com\.com
RewriteRule /(?!subfolder/)(.*) /subfolder/$1 [I,L]

make home.aspx as default page under IIS and it'll be automatically picked up.


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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