httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Ferguson <calliopes...@btinternet.com>
Subject Re: mod_rewrite - changing a Post to a Get?
Date Wed, 08 May 2002 11:05:27 GMT
BINGO!

Thanks Hans... that does the trick!

I'll be glad when I get passed this 'novice' stage ;-)

So.. to recap.. External rewritting Does not work for  POST - (thanks Joshua for
that info),
and you can get internal rewrites to work by using the pass through flag :
RewriteRule ^/posicart\.cgi$ /BCDweb/addToAndShowCart.do [PT] (thanks Hans).

My setup now uses Apache 1.3.23 + Tomcat 4.02 + Load Balancing (eg more than one
Tomcat instance).. Pascal Forget at UBeans.com wrote a good article on how to set
this up and I find it works pretty well (though I've yet to stress test it).

Again thanks everyone for your help,

Jon

Hans Juergen von Lengerke wrote:

> Oh, yes I've seen that one before. Requests which should be handled by
> mod_jk seem to not get handled on internal redirects. I'm not sure if
> this works, but try a [PT] flag instead of the [R]. It might do the
> trick.
>
> Jon Ferguson <calliopesoft@btinternet.com> on May 8, 2002:
>
> > Hi Joshua,
> >
> > Thanks for the info...
> >
> > I have not had any success with the internal redirect...   if I remove the
> > [R] then I get a 404 page not found error.
> >
> > I'm using mod_jk to link up the back-end tomcat servers (it does do load
> > balancing).  I wonder if somehow it needs an external redirect for this to
> > work?
> >
> > Cheers,
> > Jon
> >
> > Joshua Slive wrote:
> >
> > > Jon Ferguson wrote:
> > > > Hi,
> > > >
> > > > I'm trying to use Apache 1.3 with Jakarta Tomcat 4.0 and need to rewrite
> > > > a URL from a cgi script to an Action target within the Struts framework.
> > > >
> > > > Here's my rule:
> > > >
> > > >
> > > >
> > > > If I submit a form to the posicart.cgi URL using POST it Does get
> > > > rewritten and passed on.. but as a GET!  Thus all my parameters are
> > > > lost.
> > >
> > > See:
> > > http://ppewww.ph.gla.ac.uk/~flavell/www/post-redirect.html
> > >
> > > You can't really redirect POST requests reliably.  Instead, why don't
> > > you do an internal redirect (remove the [R]), and then apache will
> > > handle everything.
> > >
> > > Joshua.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message