logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: RedirectMatch not working in 2.4
Author
fitzgerac



Joined: 24 Jun 2013
Posts: 12

PostPosted: Thu 24 Mar '16 22:41    Post subject: RedirectMatch not working in 2.4 Reply with quote

So I have been upgrading our Apache 2.2 32bit servers to Apache 2.4.18 64bit on several Windows 2008R2 hosts.

Within the 2.2 config, we have a RedirectMatch rule, like this:

RedirectMatch ^/$ http://server/path/

This rule simply redirects all requests for the root / to the same server but adds the /path/ to it. This rule works great in Apache 2.2 on this same server, and Apache 2.4 on OTHER servers. The only difference on the other servers is that the RedirectMatch is in a vhost context, whereas on the broken server, it is in the general area of httpd.conf.

It's almost as if mod_alias is not having any effect, although the syntax of httpd.conf checks out and there are no errors at startup or runtime.

I have already tried reinstalling the VC+ runtimes, building a completely new httpd.conf, copying over the Apache binaries again. I know I can load the rewrite module and get a ReWriteRule to work, but we want to stick with RedirectMatch because that is what has been fully tested in DEV already.

Any thoughts? thanks in advance!
Back to top
fitzgerac



Joined: 24 Jun 2013
Posts: 12

PostPosted: Mon 28 Mar '16 23:25    Post subject: Reply with quote

For any one who finds this, I think I found the problem although I can't explain why...

We are using this Apache 2.4 server as a proxy to a backend Weblogic web server, so we also load the mod_wl_24.so module. When this module was loaded the RedirectMatch rule seemed to be ignored.

So I pored over a working Apache 2.4 server that is also a proxy to Weblogic, and uses a similar RedirectMatch rule, and found that the only difference was that this working server used vhosts.

So, on the broken server, I simply enabled mod_vhost_alias.so, even though I am not configuring any vhosts anywhere else in the config. Now the RedirectMatch rule is working.

Anybody have any idea why this would be the fix?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 29 Mar '16 10:06    Post subject: Reply with quote

I guess that the web logic module needs vhost alias module to work proper aka uses some functions from it.
Back to top


Reply to topic   Topic: RedirectMatch not working in 2.4 View previous topic :: View next topic
Post new topic   Forum Index -> Apache