Connecting Tech Pros Worldwide Forums | Help | Site Map

ModRewrite; Sortable list with nice-looking urls

Newbie
 
Join Date: Jul 2007
Posts: 19
#1: Dec 4 '08
I'm using mod_rewrtie to have nice look urls.
One of my rules are:
RewriteRule ^category/([^/\.]+)/?$ /tidskrifter_lista.php?category=$1

..which turns www/category/misc into www/tidskrifter_lista.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_lista.php?category=$1&sortby=column.

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

What can I do to pass the sorting parameters for this list with the specified url?

Newbie
 
Join Date: Jul 2007
Posts: 19
#2: Dec 7 '08

re: ModRewrite; Sortable list with nice-looking urls


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


Similar Apache Web Server bytes