Forum Discussion
Jace_45978
Nimbostratus
Oct 06, 2009moving redirects from server to F5 irule
I have been tasked with putting irule on F5 which should do what the server does for redirects. Conditions from 80 to 443 or from 443 to 80
How would this translate into f5 lingo?
anythi...
The_Bhattman
Nimbostratus
Oct 06, 2009To handle redirects there are a number of ways to handle this.
One example is the following
when HTTP_REQUEST {
if { ([HTTP::host] eq "www.something.com") and ([TCP::local_port] eq "80") and ([HTTP::method] eq "POST"}) } {
switch -glob [HTTP::uri] {
"/DealerNetwork/login*" -
"/DealerNetwork/registration.do*" -
"/DealerNetwork/forgotPasswd.do*" -
"/DealerNetwork/showProfile.do*"
{
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
}
}
In regards to the https to HTTP. You would need to make the SSL Cert is with the LTM otherwise it won't decrypt
the traffic for you to use the irule similiar to above.
Of course this is just a example.
I hope this helps
CB
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