Redirecting hits for autodiscover file on main www page with a NetScaler policy

Recently I had a customer request a policy that redirects the outlook autodiscover requests away from the normal www.example.com webservers so that their logs are not flooded with errors, over to the domain autodisover.example.com.

Follow is the commands for this using the CLI:

add responder action CUSTOMER-REDIRECT-ACTION-autodiscover.example.com redirect "\"https://autodiscover.example.com\"+HTTP.REQ.URL" -bypassSafetyCheck YES
add responder policy CUSTOMER-REDIRECT-POLICY-example.com_autodiscover "HTTP.REQ.URL.STARTSWITH(\"/autodiscover/\")" CUSTOMER-REDIRECT-ACTION-autodiscover.example.com
bind lb vserver CUSTOMER-www.example.com-SSL-443 -policyName CUSTOMER-REDIRECT-POLICY-example.com_autodiscover -priority 100 -gotoPriorityExpression END -type REQUEST

comments powered by Disqus