Forum Discussion
DM_5174
May 23, 2011Nimbostratus
merging two irules into one efficient one.
Hi All,
I was wondering if there is a way to merge two irules into one effcient one. The first irule checks the host
and if a user is coming in as www.mysite.com, it will rewrite the host head...
DM_5174
May 23, 2011Nimbostratus
I was wondering what I am doing wrong here...if you look at the results, I get a "double forward slash" after the redirect completes.data group string parameter:
Data-group name:URI-datagroup
/abc/app1 /123/app100
/abc/app2 /123/app200
/abc/app3 /123/app300
/abc/app4 /123/app400
/abc/app5 /123/app500 Coming From: http://www.mysite.com/abc/app1Redirected To:
when HTTP_REQUEST {
look for the second string in the data group
set newURI [findclass [HTTP::uri] $::URI-datagroup" "]
if { "" ne $newURI } {
HTTP::redirect "http://www.mysite.com/$newURI"
} else {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
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