8

I have Asp.NET Application installed on 'default web site\orchard'... accessible at http://localhost/orchard, and I want to use URL Rewrite. I added rules:

<rewrite>
    <rewriteMaps>
        <rewriteMap name="Blogger">
            <add key="/aaa" value="/tags/tag1" />
        </rewriteMap>
    </rewriteMaps>
    <rules>
        <clear />
        <rule name="Rewrite rule1 for Blogger" stopProcessing="true">
        <match url=".*" />
            <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                <add input="{Blogger:{REQUEST_URI}}" pattern="(.*)" />
            </conditions>
            <action type="Redirect" url="{C:1}" appendQueryString="false" redirectType="Permanent" />
        </rule>
    </rules>
</rewrite>

But when I go to http://localhost/orchard/aaa then error 404 is returned instead of redirecting to http://localhost/orchard/tags/tag1.

When I put my web application in the root folder of website redirection works. http://localhost/aaa is redirected to http://localhost/tags/tag1.

What I'm doing wrong?

Thanks for help.

James Skemp
  • 8,018
  • 9
  • 64
  • 107
zielu1
  • 1,308
  • 11
  • 17

0 Answers0