Forum Discussion
Net_Admin_86160
Jul 24, 2012Nimbostratus
Irule redirect looping
I am trying to redirect the following link
https://test.mydomain.com/webservices/rest/brand/vsd/customer/email/john.doe@johndoe.com/
the following is the irule for t...
nitass
Jul 24, 2012Employee
i think it must have something else besides this irule which causes looping.
[root@ve10:Active] config b virtual bar list
virtual bar {
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[string tolower [HTTP::uri]] contains "/data/" or [string tolower [HTTP::uri]] contains "/resources/" or [string tolower [HTTP::uri]] contains "/visitor/" or [string tolower [HTTP::uri]] contains "/hjresources/" or [string tolower [HTTP::uri]] contains "/widgets/"} {
pool WPM
} elseif {[string tolower [HTTP::uri]] starts_with "/webservices/rest/brand/dataqueue/"} {
HTTP::redirect "http://www.mydomain.com/cgi-win/rqueue.cgi?param=[HTTP::uri]"
} elseif {[string tolower [HTTP::uri]] starts_with "/webservices/rest/brand/comp/"} {
HTTP::redirect "www.mydomain.com/cgi-win/rcref.cgi?param=[HTTP::uri]"
} elseif {[string tolower [HTTP::uri]] starts_with "/webservices/rest/brand/"}{
HTTP::redirect "http://www.mydomain.com/cgi-win/rlookup.cgi?param=[HTTP::uri]"
} elseif {[string tolower [HTTP::uri]] contains "/cwpm/"} {
pool WPM2
} elseif {[string tolower [HTTP::uri]] contains "/rw37"} {
HTTP::redirect "http://www.mydomain.com/cgi-win/excn.cgi?login&mode=comp&P=RW37"
} elseif {[string tolower [HTTP::uri]] contains "/na37"} {
HTTP::redirect "http://www.mydomain.com/cgi-win/excn.cgi?login&mode=comp&p=NA37"
} elseif {[string tolower [HTTP::uri]] contains "/dc25"} {
HTTP::redirect "https://biw.mydomain.com/cgi-win/biw.cgi?mode=paidlogin&t=dc25"
} elseif {[string tolower [HTTP::uri]] contains "/dc30"} {
HTTP::redirect "https://biw.mydomain.com/cgi-win/biw.cgi?mode=paidlogin&t=dc30"
} elseif {[string tolower [HTTP::uri]] contains "/oiq" and not ([string tolower [HTTP::uri]] contains "/rest/brand/oiq/")} {
HTTP::redirect "https://test.mydomain.com/data/[HTTP::uri]"
} elseif {([string tolower [HTTP::uri]] contains "/ec/" or [string tolower [HTTP::uri]] contains "/ecn") and not ([string tolower [HTTP::uri]] contains "/rest/brand/ecn/")} {
HTTP::redirect "https://ne.mydomain.com/data/ecn"
} else {
pool WEBSERVERS
}
}
}
[root@ve10:Active] config curl -I http://172.28.19.79/webservices/rest/brand/vsd/customer/email/john.doe@johndoe.com/ -H "Host: www.mydomain.com"
HTTP/1.0 302 Found
Location: http://www.mydomain.com/cgi-win/rlookup.cgi?param=/webservices/rest/brand/vsd/customer/email/john.doe@johndoe.com/
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
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