Hello, I have one question more about redirection : We want to redirect one old domain to the new one with some conditions.
We configure some acl like this and it's work fine : acl es path_beg /es redirect location http://www.newdomain.com/es/marruecos.html if es acl en path_beg /en redirect location http://www.newdomain.com/en/morocco.html if en acl www hdr(host) -i www. redirect location http://www.newdomain.com/maroc.html if www But we need one action when some users used old link maybe like this : http://www.olddomain.com/olddirectory/oldhtmlpage.* http://www.olddomain.com/es/olddirectory/oldhtmlpage.* http://www.olddomain.com/en/olddirectory/oldhtmlpage.* do you know if with the first acl configuration, we can redirect user to : http://www.newdomain.com/olddirectory/oldhtmlpage.* http://www.newdomain.com/es/olddirectory/oldhtmlpage.* http://www.newdomain.com/en/olddirectory/oldhtmlpage.* Many thanks for you help :) Best regards, Falco 2009/6/24 Falco SCHMUTZ <fschm...@lovaservices.net> > Thanks, it's worked great !Good night > Falco > > 2009/6/23 Falco SCHMUTZ <fschm...@lovaservices.net> > > Ok, thanks Willy, i will try.Falco >> >> 2009/6/23 Willy Tarreau <w...@1wt.eu> >> >> On Mon, Jun 22, 2009 at 08:32:36PM +0200, Falco SCHMUTZ wrote: >>> > Hello everybody, >>> > Could you help to fix this configuration ? >>> > >>> > I need to redirect all sub domains except 5 (admin, pro, www, img*, >>> > domain.com without sub domain) to www.domain.com >>> > >>> > I test this setting, but did not work. >>> > >>> > acl good_subs url_beg admin pro www img* >>> > redirect location www.domain.com 301 if !good_subs >>> >>> the host name is not in the url but in the "Host:" header. So you >>> must do that instead : >>> >>> acl good_subs hdr_beg(host) -i admin. pro. www. img >>> >>> > I have no idea for http://domain.com to http://www.domain.com and i >>> did not >>> > know if img with wildcard work. >>> >>> You can do that : >>> acl good_subs hdr_beg(host) -i admin. pro. www. img domain.com >>> >>> For the wildcard you don't need anything special as hdr_reg() matches >>> at the beginning of the field. However if you need finer combinations, >>> check with the regexes. It will be harder to configure but with >>> infinite combinations. >>> >>> Willy >>> >>> >> >