« Previous Next »

Thread: rewrite with optional parameters

Last post 11-09-2009 4:14 PM by ruslany. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 11-06-2009, 5:35 AM

    rewrite with optional parameters

    I have some possible urls:

    www.domain.com/buy-tickets/eventname/?orderid=12&userid=40
    should be rewritten to:
    www.domain.com/order.aspx?name=eventname&orderid=12&userid=40

    www.domain.com/buy-tickets/eventname/?payment=s&token=54654-56456&userid=40
    should be rewritten to:
    www.domain.com/order.aspx?name=eventname&token=54654-56456&payment=s&userid=40

    As you can see, the first part of the url always consists of /buy-tickets (redirected to order.aspx)
    and /eventname, redirected as ?name=eventname

    BUT the thing is that the parameters AFTER /eventname/ may vary. sometimes its orderid and userid,
    the other time its: orderid and userid and token.

    And have more variations, so with the parameters AFTER /eventname/ I just want to pass them as they are in the URL...

    How can I do that?

  • 11-09-2009, 4:14 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 3:38 PM
    • Redmond, WA
    • Posts 661

    Re: rewrite with optional parameters

    If in your rewrite rule you set appendQueryString="true" then the existing query string will be just appended to the rewritten URL as is. Can you check if this flag is set. If with that flag you do not see the original query string appended, then can you please post the rewrite rules that you have?

    http://ruslany.net
Page 1 of 1 (2 items)
Microsoft Communities