httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 53196] New: Rewrite examples forget to encode the query string?
Date Sat, 05 May 2012 10:03:03 GMT

          Priority: P2
            Bug ID: 53196
           Summary: Rewrite examples forget to encode the query string?
          Severity: normal
    Classification: Unclassified
                OS: Linux
          Hardware: PC
            Status: NEW
           Version: 2.4.1
         Component: Documentation
           Product: Apache httpd-2

"If, on the other hand, you wish to pass the requested URI as a query string
argument to index.php, you can replace that RewriteRule with:

RewriteRule (.*) index.php?$1 [PT,QSA]"

should be:

RewriteRule (.*) index.php?${encode:$1} [PT,QSA]

since RewriteRule matches against the *decoded* url path 

That's the context I encountered the bug in.  I think it applies to most of the
other remapping examples that use $1.

Note that that this doesn't apply to rewrite rules which map to full filesystem
paths - i.e.>


No idea what you're supposed to do with substitutions in Redirect directives;
it's not documented as supporting the ${encode:$1} syntax.  Alias is fine
though (same reason as above).

You are receiving this mail because:
You are the assignee for the bug.

View raw message