All -   
I'm running several sites behind haproxy and stunnel. I would like to use haproxy to do two things -
        
        1. strip the www subdomain from all URI's
        1. redirect all http:// URI's to https://

I have created two acl's, I'm not sure if the stunnel acl will work with the X-Forwarded-For patch??

        acl stunnel src 96.14.154.160 #all https traffic, maybe.
        acl www_subdom hdr_beg(host) -i www #finds all www.xxxx

My problem is in the redirects, as near as I can tell they only accept literal strings, not variables. How do I write

        redirect prefix <orig URI with 'www.' stripped> if www_subdom
        redirect prefix <orig URI with http replaced with https> if !stunnel

Thanks for all your help.

Craig

Reply via email to