Forum Discussion
Shohab_Baig_841
Nimbostratus
May 03, 2007Using 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 "https://www.efreightquote.com/membersite/ACH/Default.aspx"
}
"/MakePayments.asp" {
HTTP::redirect "https://www.efreightquote.com/membersite/ACH/MakePayments.asp"
}
"/Signin.aspx" {
HTTP::redirect "https://www.efreightquote.com/Signin.aspx"
}
"/PaymentReport.asp" {
HTTP::redirect "https://www.efreightquote.com/membersite/ach/PaymentReport.asp"
}
"/ApproveInvoices.asp" {
HTTP::redirect "https://www.efreightquote.com/membersite/ach/ApproveInvoices.asp"
}
"/AuditInfo.asp" {
HTTP::redirect "https://www.efreightquote.com/membersite/ach/AuditInfo.asp"
}
"/BilledInfo.asp" {
HTTP::redirect "https://www.efreightquote.com/membersite/ach/BilledInfo.asp"
}
"/CreditCard.aspx" {
HTTP::redirect "https://www.efreightquote.com/QSTP/CreditCard.aspx"
}
"/Default.aspx" {
HTTP::redirect "https://www.efreightquote.com/Default.aspx "
}
default {
use pool www_freightquote_com
}
}
}
Its really slowing down the website response. could you recommend any better way to do it.
Thanks
Shohab
- Shohab_Baig_841
Nimbostratus
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. - Deb_Allen_18Historic F5 AccountCheck 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:
with this one:set req "[HTTP::host]/[getfield [HTTP::uri] "/" 2]" set redir [findclass $req $::TURL_List]
set req "[HTTP::host]/[getfield "/" 2]" set redir [findclass [HTTP::uri] $::myRedirects " "]
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