Forum Discussion
iRule URL Redirect
I have a problem and hope someone can help me. I have a use cas for one or two iRules.
The URL domain.com/member and domain.com/account must be always redirected from http to https. I have iRule for the port 80 vip and it works fine. In the member area (Port 443) are diferend buttons. The buttons call HTTPS URLs. The developer cannot change the URL of the button. Because of that, I need a iRule that can redirect all of the URLs that don’t contain “member” to http.created a
I have tried tre iRule for the 443 vip, but I dosent work:
iRule for port 80 vip (works):
when HTTP_REQUEST {
if { [HTTP::uri] contains "/member/"} {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
elseif { [HTTP::uri] contains "/account/"} {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
iRule for 443 vip (doesn’t work)
when HTTP_REQUEST {
if { not ([HTTP::uri] contains "/member/") } {
HTTP::redirect "http://[HTTP::host][HTTP::uri]"
}
}
After deploying the iRule to the 443 vip, the member area will not be displayed be (Browser Error).anyone have an idea?
1 Reply
- The_Bhattman
Nimbostratus
Are you terminating the SSL on the F5 or simply passing the SSL traffic through the F5? The reason being is that if you are not terminating the SSL Traffic on the F5, iRules will not have way to look into the encryption to allow you perform the redirect.
I hope this helps,
-=Bhattman=-
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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