Forum Discussion
Jason_19901
Jul 25, 2011Nimbostratus
Validate iRule
when HTTP_REQUEST {
Check if host is abc.com
if {[string tolower [HTTP::host]] eq "abc.com"}{
Rewrite the URI to /irj
HTTP::uri "/irj"
}
...
nitass
Jul 26, 2011Employee
can u try this?
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] eq "abc.com"} {
HTTP::uri "/irj"
} elseif {[string tolower [HTTP::host]] eq "xyz.com"} {
HTTP::uri "/irq"
} else {
do something
}
}
or
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"abc.com" {
HTTP::uri "/irj"
}
"xyz.com" {
HTTP::uri "/irq"
}
default {
do something
}
}
}
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