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 06, 2011Let's add some logging then.
when HTTP_REQUEST {
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]"
}
}
}
}
Try again and it should log to the LTM section of logs when a redirect is triggered.
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
