Re: Proxy needs to rewrite parameters in QueryString

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 18, 2009 at 8:27 PM, Andreas Dahlen <andreas@xxxxxxxxx> wrote:

> The rewrite statements was wrong (I accidently changed one / to ?), should
> be "Location:
> http://login.internal.com/LoginSuccess?servername=http://backend1.internal.c
> om"
>
> Since RewriteRules doesn't operate on what goes out, is there any other
> solution to operate on what goes out?

So basically once a user has authenticated himself thge tomcat
application generates the above redirect, right?. The browser then
will try to access this redirect.

Two things need to be done:
- The host part needs to be changed, so that the users receive a URL
that refers to the external host. Something like this might to this:

ProxyPassReverse /LoginSuccess http://login.internal.com/LoginSuccess

(ProxyPassReverse operates on redirects).

Now your users should get a redirect to
http://frontend.external.com/LoginSuccess?servername=http://backend1.internal.com
(Note, do you want to give away the internal structure of your site?)
The browser will now request this url, and since the host name part
points to your external server this host will receive it, and you can
use rewrites on this, as it is an incoming request.

Krist

-- 
krist.vanbesien@xxxxxxxxx
krist@xxxxxxxxxxxxx
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux