Solved

IIS rewrite in web.config

Posted on 2012-03-14
1
403 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 75

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

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

861 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

25 Experts available now in Live!

Get 1:1 Help Now