Does anyone know how to do this, or if this is even possible.
In order to utilize mod_rewrite correctly for my site, I'd like to be able to capture only the last two parts of an entered URL for use as values in a query string in the translated URL.
For Example:
if the user enters: www.mysite.com/piece_1/piece_2/piece_3/
I only want to capture piece_2 and piece_3 in my regular expression for my rewrite rule.
if the user enters: www.mysite.com/piece_1/piece_2/piece_3/piece_4/
I only want piece_3 and piece_4
Is this at all possible? Or do I need to set up a new rewrite rule for every level of depth in the entered URL?
P.S. I know this sounds like an odd request, but rest assured that I have my reasons.