Solved

IIS rewrite in web.config

Posted on 2012-03-14
1
395 Views
Last Modified: 2012-03-23
Hello everyone, I am fairly new to IIS rewrite stuffs, so I would like some advice. Here is the scenario: I have a site called http://foo/en/us/default.aspx Now I would like to rewrite url in such a way that when people just type http://foo or http://foo/ it should automatically goes to http://foo/en/us/default.aspx as 301 redirect. Please note that I do not have access to IIS rewrite module directly and have to add in web.config manually. Any help or suggestions will be highly appreciated.
0
Comment
Question by:KoolAsIce
1 Comment
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 37718819
You might try:

<rewrite>
  <rules>
    <rule name="redirect">
      <match url="^$" />
      <action type="Redirect" url="http://foo/en/us/default.aspx" redirectType="Permanent" />
    </rule>
  </rules>
</rewrite>

Open in new window

0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

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

11 Experts available now in Live!

Get 1:1 Help Now