sstafford
Jul 30, 2008Nimbostratus
string based https redirect
Hi all--yes I'm new.
Have a customer that needs a specific page or two forced to https when requested by a client. After poking around some, I came up with
when HTTP_REQUEST {
Check for given string and redirect if found
if {[HTTP::uri] contains "alumni/giving/gift/"}{
HTTP::respond 301 Location "https://[getfield [HTTP::host] : 1][HTTP::uri]"
}
}
which I think will work, at least for the string above. I also assume there's some sort of "logical or" that I can add so that multiple strings can be controlled by a single iRule?
Thanks