Forum Discussion
Exchange HTTP redirect method for multitenancy irule
- Nov 14, 2013
I can't see anything wrong with the logic - here's a idea to move you forward with the Rule though and including some logging;-
when HTTP_REQUEST { if { [class match [string tolower [HTTP::host]] equals dg_autoDiscover_tenants] && [HTTP::uri] equals "/autodiscover/autodiscover.xml"} { log local0. "Redirecting [HTTP::host][HTTP::uri] to [class match -value [string tolower [HTTP::host]] equals dg_autoDiscover_tenants]" HTTP::respond 302 Location [class match -value [string tolower [HTTP::host]] equals dg_autoDiscover_tenants] return } }So your datagroup dg_autoDiscover_tenants would have Hosts as keys, and URIs ie https://autodiscover.environment2.com/autodiscover/autodiscover.xml as values. Check for logging output in /var/log/ltm.
Do you know that you can use both DNS A records for autodiscover.domain.com or SRV record for _autodiscover._tcp.domain.com ( or something like that ). This may give you more flexibility as you can assign priorities and weights to the SRV records. Might be worth investigating.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com