QUERY_STRING empty when second rule aplied

Topics: Developer Forum, User Forum
Jul 2, 2007 at 10:01 AM
Hi,

I have a rule that changes a url /a/b/c/d to /a/d?parttwo=b&partthree=c

then the second rule is applied which should change it to /a?partfour=d&parttwo=b&partthree=c
The parttwo and partthree should be in QUERY_STRING, but it remains empty.

It does work when I type the first changed url in the browser, but the two steps after each other doesn't work. Does anyone know how this should work?
Coordinator
Jul 3, 2007 at 1:47 AM
sorry, what you wrote is not clear to me.
exactly what problem are you having?

here's what I have so far:
you have a set of rules, and you have an idea of what those rules ought to do.
The actual result is different from your expectation.

but as for the details, I am not clear.

can you provide some additiojnal info, like... .the actual rules you are seeing.
The results you see. The results you expect or desire.

also please remember to double-curly quote your rules so they are legible.

-Big C
Jul 4, 2007 at 8:22 AM
Edited Jul 4, 2007 at 8:24 AM
My problem is that the QUERY_STRING is empty when a second rule is applied.

The rules are:
RewriteRule ^/educator/(.*)/{?([0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12})}?/([a-fA-F0-9-]{32})/(open|download|showcase)/(.*) /educator/$1/$4/$5?GuestID={$2}&GuestKey=$3

RewriteRule (.*)/(.*)/open/{?([0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12})}?/([\d]+)(/[^\?]*)?(.*)$ $1/com.educator.storage.download.FileDownload.wcp?Org=o=$2,cn=cordys,o=vanenburg.com&EntryID={$3}&Download=false&Revision=$4&%{QUERY_STRING}

when I have the following url:
http://host/educator/testorg12/{7662CD38-0A01-1F20-008C-5EA2CD0F4ECA}/9b7cb791ab7ca17a36055ec8dfce9d2f/open/{D82CFF3C-0A01-1F20-0098-CE7ECCE343AD}/1/27557861180455065553.txt
it is changed correctly into this:
/educator/testorg12/open/{D82CFF3C-0A01-1F20-0098-CE7ECCE343AD}/1/27557861180455065553.txt?GuestID={7662CD38-0A01-1F20-008C-5EA2CD0F4ECA}&GuestKey=9b7cb791ab7ca17a36055ec8dfce9d2f

Then the second rule is applied
and the part after the questionmark is gone, because the QUERY_STRING is empty.

We have to do this in two steps because the first rule is optional and there are more options for the second rule.

I hope this is clear.
Coordinator
Jul 13, 2007 at 6:53 PM
sorry I still don't understand. What do you mean when you say
Then the second rule is applied
and the part after the questionmark is gone, because the QUERY_STRING is empty.
?

what do you get? can you show me a logfile? what do you want to get?