pool selection with 301 redirect
The goal is for sessions coming into the virtual server on port 80 depending on the uri will stay on port 80 and be directed to a specific pool. However at the end if the uri is not matched they will get a 301 to https. What is happening is the uri gets matched for instance "http://www.companya.com/mobileapp/files/client-mobile-config.json" when this url comes in the get a 301 rather then staying on port 80 and going to the right pool. I have added logging to the {log local0. "Matched pool 2 paths for [HTTP::uri]" pool pool_1} and the uri is getting logged....but it then it seems to continue and get a 301 Any thoughts?
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host][HTTP::uri]] { "www.companya.com/mobileapp" - "www.companya.com/content/files" {pool pool_1} "investor-relations.companya.com/" - "companyacareer.com/" - "joincompanya.com/" - "quotewi/" - "costcoautohome.com/" - "library.companya.com/" - "companyainsurance.com/" - "banking-credit.companya.com/" - "budgeting-investing.companya.com/" - "financial-goals.companya.com/" - "financial-planning.companya.com/" - "insurance.companya.com/" - "investment.companya.com/" - "mortgages-home-loan.companya.com/" - "retirement.companya.com/" - "companyaappupdate.com/" { } default {HTTP::respond 301 "Location" "https://www.companya.com[HTTP::uri]"} } }