Inside the <a>
tags you will use the nice link, that is category/1/id/1
(that's exactly why you're using mod_rewrite
, to be able to use nice URLs!)
As for the rule, try something like (untested):
RewriteRule category/(.*)/id/(.*)$ index.php?category=$1&id=$2&%{QUERY_STRING} [L]
Actually I would rather use
RewriteRule (.*)/(.*)$ index.php?category=$1&id=$2&%{QUERY_STRING} [L]
So you can call directly mydomain/1/1
but you got the idea I hope
EDIT: the &%{QUERY_STRING}
part is not necessary for what you asked, but I generally include it in case I want to pass any extra parameter to the page.