Hello friends,

So far I've been able to manage with mod rewrite rules for basic URL beautifying such as hiding regular browser GET requests, etc ... This time I got into trouble because a question mark in the URL leads me to a 404 error.

I have this rule:
Code:
RewriteRule ^cat-(.*)$ index.php?cat=$1 [L]
which makes my URL look like this:
Code:
http://mysite.com/cat-somecategory
Everything good so far but occasionally, to the query string is also passed a sort parameter like:
Code:
http://mysite.com/cat-somecategory?s=title:desc
and want the rule:
Code:
RewriteRule ^cat-(.*)\?s=(.*)$ index.php?cat=$1&s=$2 [L]
Even I'm escaping the question mark, I still get the 404 page. If I am replacing the question mark with any other character, the rewrite rule works! I need it to work with the category rule alone as well with the sort parameter since it's optional but cannot get there no matter what!

I would appreciate any advice you might have.

Thanks,
Rem.