locked
Exceptions in rewrite path? RRS feed

  • Question

  • User1913822523 posted

      <rewriter>
        
    <rewrite url="~/products/(.+)" to="~/products.aspx?category=$1" />
      </
    rewriter>


    Is it possible to put in exceptions to the above code? Like this on below, I know this example doesnt work but I think you get the idea of what I want. If address is "~/products/Item100" then go to item100.aspx, in all other cases "~/products.aspx?category=$1"

      <rewriter>
       
    <rewrite url="~/products/Item100" to="~/Item100.aspx" />
        <rewrite url="~/products/(.+)" to="~/products.aspx?category=$1" />
      </
    rewriter>


    Saturday, October 10, 2009 6:46 AM

Answers

  • User1913822523 posted

    my bad, didnt think about regular expression.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, October 10, 2009 7:15 AM