Tyson_James
May 24, 2018Altostratus
Very simple iRule to specific URI....
I am new to iRules and am trying to do a simple "redirect" of sorts. I have the need for anyone going to https://server.domain.com/anything-beyond-the-slash be "redirected" to the the virtual servers' pool, but add text to the URI. Below is what I have tried so far and it is not working :
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] starts_with "server.domain.com" && [HTTP::path] contains "/"} {
HTTP::uri "/add-this-text/[HTTP::uri]"
}
}
Any assistance is greatly appreciated.