Project

General

Profile

Bug #1898

url.redirect matches the raw URL instead of the normalized URL

Added by peto almost 9 years ago. Updated over 8 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
mod_redirect
Target version:
Start date:
2009-02-12
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

url.redirect matches con->request.uri rather than con->uri.path, so

url.redirect = ("^/data/file" => "foo")

applies to http://example.com/data/file, but not http://example.com/garbage/../data/file, http://example.com//data/file, http://example.com/%64ata/file, etc. This makes it very hard to write redirect rules that aren't trivial to circumvent.

Changing mod_redirect_uri_handler to use con->uri.path fixes this, and makes it consistent with $HTTP["url"]. 1.4 doesn't seem to have this problem.


Related issues

Is duplicate of Bug #1720: Rewrite/redirect rules and URL encodingNeed Feedback

History

#1

Updated by stbuehler over 8 years ago

url.path doesn't contain the query-string anyway... but see #1720.

#2

Updated by stbuehler over 8 years ago

  • Status changed from New to Duplicate

Also available in: Atom