asp.net - IIS URL redirect directory -


i having issue using iis url redirect module. trying redirect www.site.com/directory1/default.aspx www.site.com/directory2/default.aspx

so request directory1 needs go directory 2. going disabling application @ directory 1 ideas? have below, not work.

<rewrite>             <rules>                 <remove name="portal test redirect" />                 <rule name="portal test redirect" patternsyntax="wildcard">                     <match url="*directory1/*" ignorecase="false" />                     <conditions />                     <servervariables />                     <action type="rewrite" url="{r:1}/directory2/{r:2}" appendquerystring="true" />                 </rule>             </rules>         </rewrite>         

you need change rule below

<rewrite>     <rules>                     <rule name="portal test redirect">             <match url="(.*)(directory1)(.*)" patternsyntax="ecmascript"/>             <action type="rewrite" url="{r:1}directory2{r:3}" />         </rule>     </rules> </rewrite> 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -