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 ...
Colin_Walker_12
Jan 05, 2011Historic F5 Account
So you're looking to redirect based on the URI ? Something like this perhaps?
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"
}
"/applications/app2*" {
HTTP::redirect "https://[HTTP::host]/applications/app2/login.asp"
}
"/applications/app3*" {
HTTP::redirect "https://[HTTP::host]/applications/app3/login.asp"
}
"/applications/app4*" {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
}
}
I'm not sure I follow what you were trying to do with the else {HTTP::request} bit. What was that put in to accomplish?
Colin
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
