httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Obitz, Toby" <Toby.Ob...@usi.net>
Subject [users@httpd] mod_rewrite and SetHandler
Date Mon, 01 Mar 2004 21:32:08 GMT
I'm currently using apache 2.0.48 on Solaris 8 and weblogics 6.1 SP4.  I
am trying to do a Rewrite on a url containing the application path, i.e.
in my httpd.conf I have something similar to:
 
RewriteCond %{REQUEST_METHOD} ^POST
RewriteRule ^/app/login$ /web/cgi-bin/post.cgi
[T=application/x-httpd-cgi,L]

later on I have:
 
<Location /app>
   SetHandler weblogic-handler
</Location>
 
Everything works great, unless I try to get the Rewrite rule to file by
hitting the "login" page.  I would expect the Rewrite rule to rewrite
the URL from "/app/login" to "/web/cgi-bin/post.cgi".  This would then
bypass the Location match for "app".  What I see, however, is that the
Rule fires as it should (from the Rewrite Log):
 
209.135.35.83 - - [01/Mar/2004:15:47:52 --0500] [HOST
/sid#99b50][rid#11e6e0/initial] (1) go-ahead with /web/cgi-bin/post.cgi
[OK]
209.135.35.83 - - [01/Mar/2004:15:47:52 --0500] [HOST
/sid#99b50][rid#11e6e0/initial] (1) force filename /web/cgi-bin/post.cgi

to have MIME-type 'application/x-httpd-cgi'

However, after this is done, it appears that apache still forwards the
request on to WLS plugin based on the "pre-rewritten" URL with "app" and
the Location directive, not the desired outcome.
 
Is it possible to Rewrite in this scenario and force the request to go
somewhere other than the handler set up in the Location directive?  Is
there something else that I'm missing?
 
A few other notes, this worked in Apache version 1.3.29, but hasn't
worked since migrating to 2.0.  Also, the Rewrite to the cgi script
works fine if I comment out the Location directive, or modify the
initial URL to not contain "app".  The cgi script is very simple and
only writes a comment to a log file.  If I hit the cgi script directly,
it works, so there doesn't appear to be a permissions problem.
 
Any help would be greatly appreciated.
 
Thanks,
Toby
 

Mime
View raw message