With an URI like
/a-part/some-part/another-part/last-part/?some_param=some_value
how do I go about removing everything up to the last part with params and ultimately rewrite it to look like
/index.php?id=last-part&some_param=some_value
?. I tried all kinds of magic but the closest I got was removing everything up to question mark.