We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now


Mod Rewrite And Special Characters

Shroder asked
Medium Priority
Last Modified: 2006-11-18
I'm running into a problem with urls passed through modrewrite where encoded special charcters such as & (encoded as %26). When it goes through the rewrite module for some reason %26 is converted back to a & and the string is split into two varaibles.

Is there a way to force modrewrite to keep the string alone?
Watch Question

Top Expert 2008
The decoding happens before mod_rewrite is involved. You might double-encode the & into %25%26
The & is not escaped again in the substitution, because it is a valid char in the URL.

An other way would be a self-written RewriteMap (prg:) or applying a patch from http://issues.apache.org/bugzilla/show_bug.cgi?id=32328 which defines a RewriteMap internal function (int:)


Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


ok. Thank you. :)

I think I may just seperate the 'page title' from the actual file name, so I don't run into this problem anymore. The way the urls are right now probably make them SEO incompatible anyway.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.