Forum Discussion
Albert_252822
Nimbostratus
Jun 14, 2016Several Redirect URLs after blocking?
Hi all,
I have different web applications in each Virtual Server and as I have to match ASM Policies to Virtual Servers I only can have a redirect URL for different web applications.
Is it possible to have more than one unique Redirect URL for each ASM Policy? Could I redirect to different URLs depending on the Local Traffic Policy? What alternatives do I have?
Thanks in advance.
2 Replies
- Arnaud_Lemaire
Employee
Hello Albert, could you give an example of what you are trying to achieve ?
- Arnaud_Lemaire
Employee
here is an example
when HTTP_REQUEST { set needredirect 0 set requri [HTTP::uri] } when ASM_REQUEST_BLOCKING { log local0. "asm blocking" set needredirect 1 } when HTTP_RESPONSE_RELEASE { if { $needredirect } { switch -glob $requri { /application1* { HTTP::respond 302 Location "http://www.domain.com/application1/index" } /application2* { HTTP::respond 302 Location "http://www.domain.com/application2/index" } default { } } } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects