My site serves up documents from tocmat that sometimes have &‘s in the file names.
So
nick&janes.doc
Here is the URL we access it with:
http://mysite.com/sub/nick%26janes.doc
For some reason our version of Apache + OpenSSL fails to re-write this correctly due to some bug. So the %26 becomes an & and then the request is all broken, because http://mysite.com/sub/nick&janes.doc
Upgrading OpenSSL will fix the problem, but this unfortunately isn’t an option for several months.
As a work-around, we are trying to create a rewrite rule that can turn any %26 into a special character sequence…. let’s say ___--___. Then on Tomcat, we can use a filter to fix the URLs and thus no more problem.
Anyone know how I can write such a rewrite rule?
This turns
foo%26bartofoo__-__barAt that point you can use a Tomcat filter to change any URL with
__-__back to %26