Using I-rule to redirect traffic to https

Hi - We have approx. 20-25 pages on our website which needs to be secured. I am using following I-rule to do it. Following is a sample what I am writnng to make those pages secure:

when HTTP_REQUEST {

switch -glob [HTTP::uri] {

“/” {

HTTP::redirect “Freight Shipping Quotes - LTL & Truckload with Instant Rates | Freightquote”

}

“/MakePayments.asp” {

HTTP::redirect “Freight Shipping Quotes - LTL & Truckload with Instant Rates | Freightquote”

}

“/Signin.aspx” {

HTTP::redirect “Freight Shipping Quotes - LTL & Truckload with Instant Rates | Freightquote”

}

“/PaymentReport.asp” {

HTTP::redirect “Freight Shipping Quotes - LTL & Truckload with Instant Rates | Freightquote”

}

“/ApproveInvoices.asp” {

HTTP::redirect “Freight Shipping Quotes - LTL & Truckload with Instant Rates | Freightquote”

}

“/AuditInfo.asp” {

HTTP::redirect “Freight Shipping Quotes - LTL & Truckload with Instant Rates | Freightquote”

}

“/BilledInfo.asp” {

HTTP::redirect “Freight Shipping Quotes - LTL & Truckload with Instant Rates | Freightquote”

}

“/CreditCard.aspx” {

HTTP::redirect “Freight Shipping Quotes - LTL & Truckload with Instant Rates | Freightquote”

}

“/Default.aspx” {

HTTP::redirect "Freight Shipping Quotes - LTL & Truckload with Instant Rates | Freightquote "

}

default {

use pool www_freightquote_com

}

}

}

Its really slowing down the website response. could you recommend any better way to do it.

Thanks

Shohab

I have fixed signin.aspx page but that doe snot solve my problem. Can anyone take a look at the rule and recommend which can boost the performance.

Thanks

Shohab

Check out this post for an example of solving the same problem using “findclass” instead of “switch”. Not sure if it will improve performance, but it’s worth trying:

DevCentral - An F5 Technical Community (Click here)

Since you want to switch on the entire URI, instead of just the host & part of the URI, just replace these 2 lines:

set req "[HTTP::host]/[getfield [HTTP::uri] "/" 2]"
set redir [findclass $req $::TURL_List]

with this one:

set req "[HTTP::host]/[getfield  "/" 2]"
set redir [findclass [HTTP::uri] $::myRedirects " "]

HTH

/deb