Forum Discussion
Is there a way to apply a different ASM policy with iRules
We have a need to apply a different ASM policy to an app that is already behind a policy from our main page. For example, there is an iRule that states to send traffic from /differentapp/ to a different pool. Can we also add to disable the one ASM policy and apply a different one in the same iRule?
Yes, you could use the
function. For more details on this see: https://devcentral.f5.com/wiki/iRules.ASM__enable.ashxASM::enable
Or, even better, you can also use an LTM policy to do this.
- Stanislas_Piro2
Cumulonimbus
Hi,
Niels provided the code to change ASM policy within an iRule as you asked.
But the question is why don't you change the ASM policy in the LTM Policy which assigned the default ASM Policy?
You only have to create a new rule in this policy. This policy can also be used to change pool assignment...
iRules are really powerful, but always try with policies before writing irules.
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