Forum Discussion
charlestips_149
Nimbostratus
Jun 30, 2010http to https redirect except for specific URL
We currently have a wildcard cert and virtual server setup so that anyone trying to go to http://www.domain.com/directory gets redirected to https://www.domain.com/directory simple enough
wh...
charlestips_149
Nimbostratus
Jul 06, 2010Here 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/*"
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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