there has to be a better way...

Topics: User Forum
Apr 2, 2008 at 10:41 PM
I am new at this - but you can see what I am up to...
Is there a way to do it in one repeating way, as I think I may need up to 15 params! but stopped here at 6!

RewriteRule ^/review/(^/+)$ /kangareview.dll/$1
RewriteRule ^/review/(^/)/(^/)$ /kangareview.dll/$1?$2
RewriteRule ^/review/(^/)/(^/)/(^/+)$ /kangareview.dll/$1?$2=$3
RewriteRule ^/review/(^/)/(^/)/(^/)/(^/)$ /kangareview.dll/$1?$2=$3&$4
RewriteRule ^/review/(^/)/(^/)/(^/)/(^/)/(^/+)$ /kangareview.dll/$1?$2=$3&$4=$5
RewriteRule ^/review/(^/)/(^/)/(^/)/(^/)/(^/)/(^/)$ /kangareview.dll/$1?$2=$3&$4=$5&$6
RewriteRule ^/review/(^/)/(^/)/(^/)/(^/)/(^/)/(^/)/(^/+)$ /kangareview.dll/$1?$2=$3&$4=$5&$6=$7

also, just for info, the latest version couldn't cope with the first line.. I had to download the last release
Coordinator
Apr 15, 2008 at 6:13 PM
Check the tests, which are shipped in the source release. There is a test called "TransformUrlSegmentsToQueryParamsIteratively" that may help you.