Rewrite do redirection RRS feed

  • Question

  • User-186651909 posted


    We have a site separated in 3 versions.

    Site : www.mysite.com

    arr.mysite.com (with binding www.mysite.com)
    v1.mysite.com  (asp + html)
    v2.mysite.com  (asp.net)
    v3.mysite.com  (asp.net)

    I create the following rules

    <rule name="V1 " stopProcessing="true">
    <match url="^((allo|bonjour)(/.*)?)" />
    <action type="Rewrite" url="http://v1.mysite.com/{R:0}" logRewrittenUrl="true" />

    <rule name="V2" stopProcessing="true">
    <match url="^((budget|test)(/.*)?)" />
    <action type="Rewrite" url="http://v2.mysite.com/{R:0}" logRewrittenUrl="true" />

    else rewrite to V3

    So everything works fine exept for the rules rewrited to V1.
    When I use a link supposed to be rewrite on V1 without a slash at the end, (www.mysite.com/allo) the link is redirected as follow

    v1.mysite.com/allo instead on staying on www.mysite.com

    If I add the slash at the end (www.mysite.com/allo/) it works fine.

    I don't have the problems with the other sites (v2 and v3) the rewrite is done properly.



    Tuesday, September 19, 2017 8:12 PM

All replies

  • User-2064283741 posted

    What does failed request tracing say for each of these cases?

    Does it match the pattern?


    Tuesday, September 19, 2017 11:36 PM
  • User-460007017 posted

    Hi steveddd,

    The V1 rule works fine on my side, I didn't get any redirection as well. So Please clean the browser cache then enable the failed request tracing as rovastar said. Of course, you could try to access the URL with IE explorer while chrome and firefox could probably cause the redirection. In addition, if you have something like cold fusion or global rule, it could cause this issue as well. So, please check the log file, if the FRT log display a redirection, then you may need to check the IIS configuration like shared configuration otherwise, it shouldn't be an IIS issue.

    Best Regards,

    Yuk Ding

    Wednesday, September 20, 2017 7:02 AM