Forum Discussion
iRule http host with wildcard domain
For wild card we could use an equivalent string function: I just writing a rule, you can test it. if its not worked use pool as well
when HTTP_REQUEST {
if { [string match "example*.domain.com" [string tolower [HTTP::host]]] } {
}
else {
reject
}
}
Thanks for reply, sir. Please check this.
My irule is:
when HTTP_REQUEST {
if { [string match "*.hackit.com" [string tolower [HTTP::host]]] } {
log local0. "Host is [HTTP::host]"
} else {
reject
}
}
Check the log:
<HTTP_REQUEST>: Host is www.gslb.hackit.com
The irule didn't work. My goal is if I access *.hackit.com, it passes. When I access *.*.hackit.com, it rejects.
Recent Discussions
* 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