How to capture a 'sub-section' of a URL in a rewrite rule?
- by George Edison
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+)?$ …