Mod Rewrite And Special Characters

Posted on 2006-03-28
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?
Question by:Shroder
    LVL 27

    Accepted Solution

    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 which defines a RewriteMap internal function (int:)

    Author Comment

    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.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Employ management and Helpdesk software 4 24
    Nginx CDN 12 101
    XAMPP 3 37
    Redirect and Rewrite URL using .htaccess 38 71
    Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
    In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video discusses moving either the default database or any database to a new volume.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now