Forum Discussion
JOBrien2019
Nimbostratus
Apr 15, 2019iRule using IP
I want to setup an iRule to redirect on an IP which has a swagger page. Here's what I have:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"**My ip address here**" {
if { [HTTP::uri] starts_with "swagger" } {HTTP::redirect "https://[HTTP::host]/"}
if { [HTTP::uri] starts_with "api" } {HTTP::redirect "https://[HTTP::host]/"}
}
}
}
By this guide it looks correct but it doesn't actually redirect a page.