mRAza, The B flag does indeed seem to be exactly what I need. But it produces a 500 server error for some reason. Not sure why at the moment. Still researching.

Gavo, I'm afraid I'm lost. Does this help with the mod_rewrite problem?

---------- Post added at 08:15 PM ---------- Previous post was at 08:04 PM ----------

Looks like an apache version issue.

---------- Post added at 08:43 PM ---------- Previous post was at 08:15 PM ----------

mRAza, I can confirm the problem with the B flag is the apache version. Apparantly it was only made available from 2.2.7 and has since been known to have bugs till at least 2.2.9. The version we currently use is 2.2.3 and though we could just update, it needs to be tested first, which annoyingly means we need to come up with a work around for the time being.

We have opted to double encode ONLY the & char, and not everything else. So instead of "%26" it will be "%2526" and this seems to work.

Thanks for the help everyone. And thanks for finding that B flag. I'm sure that will be most useful when we take the plunge to upgrade.