« Previous Next »

Thread: Multiple Querystrings

Last post 07-08-2009 6:57 AM by AdamLock. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 07-07-2009, 11:55 AM

    • AdamLock
    • Not Ranked
    • Joined on 07-07-2009, 11:45 AM
    • Posts 6

    Multiple Querystrings

    Hi

    I have a page which has links in a mmenu system which can build up into querystrings to filter products - for example:

    link >> Solid

    link>> Oak

    Clicking the first link will redirect to the same page with the querystring page.aspx?type=solid

     Once the page reloads, the links in the menu are appended with the new querystring., so the link>> oak will be page.aspx?type=solid&species=oak

     I use these querystrings to filter down user selections.

    Is it possible to write a rule to cover these querystrings, bearing in mind a user may click one or many of these links to build up a url, and may do so in any order i.e.

     

    User 1 may click the menu to produce:

    page.aspx?type=solid&species=oak

    Another may click so the url is page.aspx?species=oak&type=solid

    And another may click to produce page.aspx?type=solid&edge=square&species=maple

     

    Is there any way to provide any uniformity with this and rewrite the urls so they are displayed in a set order e.g the order always goes page/type/species/edge even if the querystring is in no particular order, and then drop the rewritten path if its not applicable e.g. if type wasn't specified in the above example, it would just re-write page/species

     

    Sorry if I'm not clear, I really would like some help on getting around this so if you need any clarification, please let me know!!

     

    Thanks

     

     

  • 07-07-2009, 1:42 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Multiple Querystrings

    How would you distinguish between url page/type and page/species in case when only type and only species are specified?  Seems like you either need to make your url to look like page/type=type/species=species/ (basically like query-string) in which case the order does not matter or you need to force your users to choose things in order.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 07-08-2009, 6:57 AM In reply to

    • AdamLock
    • Not Ranked
    • Joined on 07-07-2009, 11:45 AM
    • Posts 6

    Re: Multiple Querystrings

     I understand what you're saying, would it be possible to have a rule where I have 'placeholders' in the url

     

    e.g page/type/edging/species

     

    And if someone does click on a linl, I replace the placeholder with the value e.g

    page/solid/edging/oak

    And have the rewrite mod only parse replaced placeholder items?

    That way I would know the order in which they come in/?

     

    Cheers

Page 1 of 1 (3 items)
Microsoft Communities