Forum Discussion
Paul_Dawson_103
Nimbostratus
Feb 09, 2006http redirect
Hello,
Will this iRule rewrite all requests (both http and https) containing "url1.bdos.bdd.local" in the URI to "http://url2.bdos.bdd.local"?
Thanks?
--------------------------
when HTTP_REQUEST {
if { [HTTP::uri] contains "url1.bdos.bdd.local" } {
HTTP::redirect "http://url2.bdos.bdd.local"
}
}
---------------------------------
3 Replies
- Colin_Walker_12Historic F5 AccountThat rule will work for both HTTP and HTTPS, provided the BIG-IP is set to terminate the SSL (Client SSL Profile), otherwise it won't be able to inspect the packet information to make the redirect.
Note that you will either have to add this rule to both your HTTP and HTTPS VIPs, or have one VIP that handles all ports.
-Colin - Paul_Dawson_103
Nimbostratus
Thanks for that Colin.
I'm new to iRules but I have to become familiar - so you may be seeing more of me. :-)
Assuming that it wasn't client side SSL and I wanted to redirect, would I then do that on a port basis using the CLIENT_ACCEPTED event descriptor? - Colin_Walker_12Historic F5 AccountYes, if you're looking to redirect the connections coming in on port 443, you should be able to do that, but you wouldn't be able to read into any of the HTTP information, as it would be encrypted still.
-Colin
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