Forum Discussion
John_Stevensen
Nimbostratus
Sep 20, 2017IF http::host NOTEQUALS? Whats the correct way to do this?
I apologize but the formatting is not showing properly.
Im trying to find the "right way" to write this iRule - but I cannot confirm there is a "not equal" that exists....
when HTTP_REQUEST {
...
Stanislas_Piro2
Cumulonimbus
Sep 21, 2017Hi,
The right syntax is
ne To compare strings
when HTTP_REQUEST {
if { ([HTTP::host] ne "orders.widgets.com") } {
HTTP::redirect "https://orders.widgets.com/redirectpage.html"
}
}
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