RE: redirects conundrum

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

 



The issue is that you are redirecting / to /a/

You can accomplish what you need with mod_rewrite, though I am not sure the 
processing order for redirects done with Redirect and those done with 
mod_rewrite so this might involve changing the Redirect permanent directives 
to mod_rewrite redirect directives.

benji

Benji Spencer
System Administrator

Moody Bible Institute
Phone: 312-329-2288
Fax: 312-329-8961


> -----Original Message-----
> From: Eric Bowman [mailto:ebowman@xxxxxxxxx]
> Sent: Friday, September 12, 2008 9:07 AM
> To: users@xxxxxxxxxxxxxxxx
> Subject:  redirects conundrum
>
> Hi,
>
> I'm struggling a bit with mod_alias, wondering if someone can help.
>
> I have the following configuration, running against httpd 2.2.6
>
> <Location /balancer-manager>
>     SetHandler balancer-manager
>     Order Deny,Allow
>     Deny from all
>     Allow from all
> </Location>
>
> <VirtualHost *:80>
>     ServerName example.com
>     ServerAlias *.example.com
>
>     DocumentRoot "/var/www/htdocs"
>     <Directory "/var/www/htdocs">
>         Options FollowSymLinks
>         AllowOverride All
>         Order allow,deny
>         Allow from all
>     </Directory>
>
>     Redirect permanent /a http://example.com/a/
>     Redirect permanent /foo http://example.com/a
>     Redirect permanent /login http://example.com/a/login
>     Redirect permanent / http://example.com/a/
>
>     ProxyPass /bar balancer://barcluster stickysession=BARID
>     ProxyPassReverse /bar http://192.168.123.210:35600/bar
>     ProxyPassReverse /bar http://192.168.123.226:35600/bar
>     ProxyPassReverse /bar http://192.168.123.227:35600/bar
>     <proxy balancer://barcluster>
>         BalancerMember http://192.168.123.210:35600/bar loadfactor=1
> route=210
>         BalancerMember http://192.168.123.226:35600/bar loadfactor=1
> route=226
>         BalancerMember http://192.168.123.227:35600/bar loadfactor=1
> route=227
>     </proxy>
>
>     ProxyPass /bar !
>     ProxyPass /a/ balancer://foocluster/
>     ProxyPassReverse /a http://192.168.123.226:35640/foo/
>     <proxy balancer://foocluster>
>         BalancerMember http://192.168.123.226:35640/foo/ loadfactor=1
>     </proxy>
> </VirtualHost>
>
>
> In a nutshell, requests to /bar go to to one cluster, and basically
> "/everything%20else" gets redirected to "/a/everything%20else", and
> sent
> to a separate cluster.  We need this behaviour.
>
> What I'm wondering is, how can I prevent /balancer-manager from
> redirecting to /a/balancer-manager?  I've tried everything obvious, and
> the only way I can make it work is to remove the line "Redirect
> permanent / http://example.com/a/"; which breaks everything else.
>
> Is there a way to prevent /balancer-manager from redirecting similar to
> how /bar doesn't redirect, but without proxying?
>
> Thanks in advance,
> Eric
>
> --
> Eric Bowman
> Boboco Ltd
> ebowman@xxxxxxxxx
> http://www.boboco.ie/ebowman/pubkey.pgp
> +35318394189/+353872801532
>
>
> ---------------------------------------------------------------------
> 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

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[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