ModRewrite; Sortable list with nice-looking urls

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • luttkens
    New Member
    • Jul 2007
    • 23

    ModRewrite; Sortable list with nice-looking urls

    I'm using mod_rewrtie to have nice look urls.
    One of my rules are:
    RewriteRule ^category/([^/\.]+)/?$ /tidskrifter_lis ta.php?category =$1

    ..which turns www/category/misc into www/tidskrifter_lis ta.php?category =misc. This page shows all items in that category in a list. Since I want the user to be able to sort the list by different columns I need to be able to add parameters to the url.

    usually I would do like this: /tidskrifter_lis ta.php?category =$1&sortby=colu mn.

    But this is not working with my nice-looking urls; www/category/misc?sortby=col umn.... only the category parameter is passed.

    What can I do to pass the sorting parameters for this list with the specified url?
  • luttkens
    New Member
    • Jul 2007
    • 23

    #2
    I've found the solution...just add &%{QUERY_STRING } at the end of the rewrtie rule

    Comment

    Working...