Forum Discussion
deni_22991
Nimbostratus
Jan 04, 2011redirect to https multiple uri's while letting others pass through
I am trying to create an iRule that will force ssl on specific multiple URI's under a specific host while letting those that do not need SSL to pass through. I am working on BIG-IP 9.4.7 Build 320.1 ...
Chris_Miller
Altostratus
Jan 07, 2011Good...that's definitely proper.
I'm adding another log statement that should log every single HTTP Request so kindly check the logs again after hitting the Virtual Server with the following rule.
when HTTP_REQUEST {
log local0. "User went to http://[HTTP::host][HTTP::uri]" if { [HTTP::host] equals "appsf5.com" } {
switch [string tolower [HTTP::uri]] {
"/applications/app1*" {
HTTP::redirect "https://[HTTP::host]/applications/app1/logon.aspx"
log local0. "Requested http://[HTTP::host][HTTP::uri] and was redirected to https://[HTTP::host]/applications/app1/logon.aspx"
}
"/applications/app2*" {
HTTP::redirect "https://[HTTP::host]/applications/app2/login.asp"
log local0. "Requested http://[HTTP::host][HTTP::uri] and was redirected to https://[HTTP::host]/applications/app2/login.asp"
}
"/applications/app3*" {
HTTP::redirect "https://[HTTP::host]/applications/app3/login.asp"
log local0. "Requested http://[HTTP::host][HTTP::uri] and was redirected to https://[HTTP::host]/applications/app3/login.asp"
}
"/applications/app4*" {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
log local0. "Requested http://[HTTP::host][HTTP::uri] and was redirected to https://[HTTP::host][HTTP::uri]"
}
}
}
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