Recently, I upgraded my Apache server from 2.0 to 2.2.24, but I have an issue with RedirectMatch
.
My old RedirectMatch
directive:
RedirectMatch ^/abc/abcd /otherurl/someaction
In Apache 2.0, if we use HTTPS to access, eg. https://www.example.com/abc/abcd
, it will redirect to https://www.example.com/otherurl/someaction
.
But in apache 2.2.24, it returns http://www.example.com/otherurl/someaction
(HTTP, not HTTPS) - it seems Apache has changed the request schema.
If I check the HTTP response by http watch, I find a difference between 2.0 and 2.2.24.
Under Apache 2.0 the Location
HTTP response header is /otherurl/someaction
- a relative path URL.
But on Apache 2.2.24 the Location
header is http://www.example.com/otherurl/someaction
- the full absolute URL.
Any idea for this issue?