IIS redirect into subdirectory

iisredirect

I have under my default web site the directories:

/myapp/
/myapp/v1/
/myapp/v2/
/myapp/v3/
/myapp/administration/

Now I would like to http-redirect all users who type /myapp or /myapp/ or /myapp/index.html in their browser, to /myapp/v3/index.html.

Requests coming to

/myapp/favicon.ico
/myapp/typeyourfilenamehere.html

should not be forwarded. But the only option I found was "Only redirect requests to content in this directory", but that would include not only the index.html, but also typeyourfilenamehere.html.

How can I configure the aforementioned behaviour in IIS?

EDIT: Thanks to the quick answer of @JamesRyan, "IIS URL rewrite 2.0" has just put the following into my Web.config:

    <rewrite>
        <rewriteMaps>
            <rewriteMap name="/myapp">
                <add key="/myapp" value="/myapp/v3/" />
                <add key="/myapp/" value="/myapp/v3/" />
                <add key="/myapp/index.html" value="/myapp/v3/" />
            </rewriteMap>
        </rewriteMaps>
        <rules>
            <rule name="Umschreibregel1 für /myapp" stopProcessing="true">
                <match url=".*" />
                <conditions>
                    <add input="{/myapp:{REQUEST_URI}}" pattern="(.+)" />
                </conditions>
                <action type="Redirect" url="{C:1}" appendQueryString="false" />
            </rule>
        </rules>
    </rewrite>

At a quick glance, it works as indented, but perhaps someone could explain me what each line tells the rewrite engine.

Best Answer

Use an URL rewriting module, then you can redirect according to any pattern you like with whatever exceptions you like.