Skip to main content.
home | support | download

Back to List Archive

ReplaceRules Stacking

From: David Hane <dhane(at)not-real.pw.usda.gov>
Date: Thu Oct 27 2005 - 18:31:43 GMT
I recently installed mod_rewrite for Apache and it seems to be causing
some problems with the swish url creation. Specifically, we are indexing
a mysql database dumped into html files. These files have names that
contain characters that should be encoded. I have encoded the
appropriate characters in the filename, ie. ( -> %28, but now apache
wants to encode the % character turning %28 into %2528. Obviously this
breaks everything.

I would like to know if it's possible to stack "ReplaceRules replace"
lines in the swish config file. I can't seem to get it to work. Only the
first rule seems have an effect.

What I'm looking for is something like this:
ReplaceRules replace %2f /
ReplaceRules replace %23 #
ReplaceRules replace %60 '
ReplaceRules replace %60 '
ReplaceRules replace %5E ^
ReplaceRules replace %2f /


This seems to be the only real solution because the regex feature would
require many rules in order to catch all the possible file names.

Thanks,

Dave Hane
Received on Thu Oct 27 11:32:10 2005