httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Spil Oss" <spil....@googlemail.com>
Subject Re: [users@httpd] Rewrite "Location:" header.
Date Fri, 11 May 2007 10:08:10 GMT
On 11/05/07, moh bad <mohamed@sysnode.net> wrote:
> sorry, you're right I need to give some explanation
>
> I have an apache server behind a reverse proxy,
> The reverse-proxy handles ssl connexion and send the request to the apache
> server.
> But when the apache server send an redirect with a Location header, the
> reverse-proxy
> didn't rewrite the value of this header.
>
> 1/ So the client access for example https://www.toto.com
> 2/ the reverse proxy handles the ssl connexion, and send the request to
> apache server
>     So apache server receive a request on http://www.toto.com site
> 3/ Apache server send a redirect to http://www.toto.com/document
> 4/ the reverse proxy send to the client the redirect as-is without rewriting
> it to https://www.toto.com/document
>
> So, I wanted to solve this problem by rewriting the Location header before
> apache server send the
> response headers.
>
> thank you.
>
> 2007/5/11, Nick Kew <nick@webthing.com>:
> > On Fri, 11 May 2007 01:10:12 +0200
> > "moh bad" <mohamed@sysnode.net> wrote:
> >
> > > Hi,
> > >
> > > I wanted to modify the "Location:" header in 30X http responses using
> > > apache 2,
> > > but failed to find a good solution.
> > >
> > > In mod_headers I can unset the header and set a new one, but I can't
> > > use a regular expression to modify his original value.
> >
> > Yes you can.  Header edit.  Provided you have an up-to-date version.
> >
> > But the usual reason for rewriting a Location is in a reverse proxy
> > situation, where there are better solutions.  As Joshua said, you
> > need to tell us what you're really doing.
> >
> >
> > --
> > Nick Kew
> >
> > Application Development with Apache - the Apache Modules Book
> > http://www.apachetutor.org/
> >
> >

Sounds like your reverse proxy is not an apache server? (SSL offload engine?)
This reverse proxy does not rewrite your Location header in the 302 response.

Ugly hack. You might solve this by setting ServerName
https://www.toto.com and enabling UseCanonicalName On, this will force
redirects to be pointing to https://www.toto.com.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message