jasimon9 - 3:11 am on Jan 31, 2013 (gmt 0)
Thanks again to g1smd and lucy!
My first attempts at this approach did not use the nested groups, but I switched to the the more complex approach with the hope that somehow I could eliminate the slashes signifying the "empty directories". But I could not find a way to do that, and neglected to revert to the non-nested approach. Which reversion I have now done.
Bottom line is that each slash has to come from somewhere not in the back-reference; thus the nested approach gives no benefit over the simpler approach.
The present internal rewrite handles the variable number of parameters just fine. Thus all links from within the website can be handled. It is only the redirect that at present has to insert the slashes where the problem comes in. After some thought, I am inclined to set up multiple rules to handle the different variations that actually occur as suggested by g1smd.
Another approach might be to put in a rule to fill out the missing parameters when they don't occur. However, this would probably end up being excessively complicated as having separate rules for the cases.