All pastes #243441 Raw Edit

Sashlik

public text v1 · immutable
·published 2006-11-08 14:11 UTC
rendered paste body
I have apache linked with tomcat with mod_jk. I use mod_rewrite to hide actual links.
So, i have the following rule:
RewriteRule ^/(.*)-genre-(.*)-subgenre-ringtones$       /ringtone/home.do?catName=$2&parentCatName=$1 [PT,NE]

this rule must extract catName and parentCatName parameters and pass to tomcat's /ringtone/home.do

when parameters contains special characters, apache either corrupts them or misses at all. Here are 2 example URLs:

http://ringtones.thumbplay/test-genre-ok+%26+ok-subgenre-ringtones

parentCatName passes ok and equals to "test"
catName is corrupted and equals to "ok" (without & ok)

Second example:
http://ringtones.thumbplay/test-genre-ugly+%23%25'+%40+chars-subgenre-ringtones

parentCatName passes ok and equals to "test"
catName missed at all, but should equal to "ugly #%' @ chars"