I know the title is a little bit strange, but here is what the URLs look like:
/user/xxx/page
/user/xxx/page?error=yyy
The rule for the first URL looks something like this:
RewriteRule ^user/(\d+)/page$ something.pl?id=$1 [L]
And to make it work with the second URL, it becomes:
RewriteRule ^user/(\d+)/page(error=\d+)?$ something.pl?id=$1 [L]
My question is... how do I capture the error number? I tried both of these:
RewriteRule ^user/(\d+)/page(error=(\d+))?$ something.pl?id=$1&error=$2 [L]
RewriteRule ^user/(\d+)/page(error=(\d+))?$ something.pl?id=$1&error=$3 [L]
But it isn't working...
How can I do this?