Forum Discussion
charlestips_149
Jul 06, 2010Nimbostratus
Here is what I ended up putting in, which half works.
when HTTP_REQUEST {
Check if domain is "www.domain.com"
if {[string tolower [HTTP::host]] eq "ww2.domain.com"}{
Check if URI isn't /directory
switch [HTTP::uri] {
"/directory/page.aspx" {
Exit this event from this iRule
return
}
}
}
Redirect everything else to HTTPS
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
The problem is that this only works if I go to "/directory/page.aspx" if I try it with "/directory" in the script I don't get the non redirect if I try to go to any pages within that directory.
How can do I do a catchall for anything below that directory, I tried "/directory/*"