Hi,

On Thu, Apr 30, 2009 at 04:24:01PM -0700, Andrew Otto wrote:
> I'd like to use haproxy to redirect all requests of the form  
> *.mydomain.com/* to $1.mydomain.org$2.  Basically, I want to translate  
> all mydomain.com URLs to the exact same URL, but replacing .com  
> with .org.
> 
> Can I do this using haproxy's redirect feature?

Right now you can't.

> I'm having a bit of  
> trouble getting my acls to work right, and I can't find many examples  
> out there.  I know I need to define an acl and then use
> 
>   redirect prefix http://mydomain.org  if url_mydomain_com
> 
> If I can get the acl right, then I should able to match whatever I  
> want.  redirect prefix allows me to keep the path part the URL string,  
> but how can I keep the host portion of the URL if there is one?

it is not yet possible. This need has been identified and we're working
on it at Exceliance. We need to identify all usage patterns to ensure
that we can cover all situations. Most likely being able to specify the
protocol from a string and extracting the host part from a configurable
header should solve most common needs. If the host part needs rewriting,
we would then just have to rewrite the host part before performing the
redirection.

Regards,
Willy


Reply via email to