Today I've noticed that mod_alias
's Redirect
and RedirectMatch
directives show a different behavior in how they handle the redirect URL.
A statement like this:
Redirect 301 "/foo" "/bar%20baz"
will redirect to the literal URL bar%20baz
, whereas
RedirectMatch "/foo" "bar%20baz"
will redirect to bar%2520baz
, as the redirect URL's percent sign is escaped.
My redirect URLs are already escaped. Is there any way I can tell RedirectMatch
to not escape them any further?
As far as I understand the manual you would not need to percent encode the new URL anyway and could use: