Forum Discussion
IRule to Block a particular URL but allow everything else
Hi Qasim,
Can you try this iRule?
when HTTP_REQUEST {
if { ([HTTP::host] equals "test.abc.com") && ([string tolower [HTTP::uri]] starts_with "/absauth/service") } {
reject
}
}Hi Eaa,
thanks for your swift response but if I want to add another line for example everything else should be redirected to pool : abc123.
how would that look like?
Regards,
Qasim
- Oct 30, 2019
If you use pool_abc123 as default pool, you don't need else statement.
If you don't have default pool, you can use this iRule:
when HTTP_REQUEST { if { ([HTTP::host] equals "test.abc.com") && ([string tolower [HTTP::uri]] starts_with "/absauth/service") } { reject } else { pool abc123 } } - QasimOct 30, 2019
Cirrostratus
thank Eaa.
Now the problem is that request to other FQDNs goes to the same pool. anyway we can amend the last line and basically say :
Else
if the host name is test.abc.com redirect traffic to pool abc123
- Oct 30, 2019
You can use this.
when HTTP_REQUEST { if { [HTTP::host] equals "test.abc.com" } { if { [string tolower [HTTP::uri]] starts_with "/absauth/service" } { reject } else { pool abc123 } } } - QasimOct 30, 2019
Cirrostratus
thank you Enes.
Much appreciated.
Regards,
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
