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

