Forum Discussion
Performing redirect in function of host
I am configuring an access pilcy and in my end point I need to do one redirection or another depending on the host of the request that I receive
I've tried to do the following
En mi macro I check If my host is hosts
If not I go to hte fallback to other redirect
This macro is part of this other
Could you tell me if this will work finew and if the regular expresion is correct
Have you tested it ? This is the best way to find if something is not working.
After that you can just try the "ACCESS_POLICY_AGENT_EVENT" to trigger an irule event. First you may need to save the HTTP::host to a variable in the "HTTP_REQUEST" event as I do not renember if the HTTP::host can be used directly in the "ACCESS_POLICY_AGENT_EVENT" but testing this will tell you the answer.
https://clouddocs.f5.com/api/irules/HTTP__host.html
https://clouddocs.f5.com/api/irules/ACCESS_POLICY_AGENT_EVENT.html
https://clouddocs.f5.com/api/irules/ACCESS__policy.html
Also this post is nice as it seems like your usercase, so sometimes when you google for previous posts you will find answer even without asking:
https://community.f5.com/t5/technical-forum/apm-policy-based-on-http-host-header/td-p/206460
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