Project

General

Profile

Bug #1898

closed

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

Added by peto over 11 years ago. Updated over 11 years ago.

Status:
Duplicate
Priority:
Normal
Category:
mod_redirect
Target version:
ASK QUESTIONS IN Forums:

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.


Files


Related issues

Is duplicate of Bug #1720: Rewrite/redirect rules and URL encodingFixedActions
#1

Updated by stbuehler over 11 years ago

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

#2

Updated by stbuehler over 11 years ago

  • Status changed from New to Duplicate

Also available in: Atom