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 10, 2011Adding a default statement as well.
when CLIENT_ACCEPTED {
set default_pool [LB::server pool] }
when HTTP_REQUEST {
if { [HTTP::host] equals "appsf5.sd.gov" } {
log local0. "User went to http://[HTTP::host][HTTP::uri]"
set site [HTTP::uri]
switch -glob [string tolower [HTTP::uri]] {
"/applications/dp42launchpad*" {
HTTP::redirect "https://[HTTP::host]/applications/dp42launchpad/logon.aspx"
log local0. "Requested http://[HTTP::host][HTTP::uri] and was redirected to https://[HTTP::host]/applications/dp42launchpad/logon.aspx" }
"/applications/st01fastfile*" {
HTTP::redirect "https://[HTTP::host]/applications/st01fastfile/login.asp"
log local0. "Requested http://[HTTP::host][HTTP::uri] and was redirected to https://[HTTP::host]/applications/st01fastfile/login.asp" }
"/applications/gf79biggame*" {
HTTP::redirect "https://[HTTP::host]/applications/gf79biggame/login.asp"
log local0. "Requested http://[HTTP::host][HTTP::uri] and was redirected to https://[HTTP::host]/applications/gf79biggame/login.asp" }
"/applications/gf82*" {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
log local0. "Requested http://[HTTP::host][HTTP::uri] and was redirected to https://[HTTP::host][HTTP::uri]" }
default {
pool default_pool }
}
}
when HTTP_RESPONSE {
if { [HTTP::status] eq "403" } {
log local0. "403 for $site }
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
