Forum Discussion
Ijaz_37879
Nimbostratus
Jun 29, 2009URI redirection
Hello:
Can somebody validate the following iRule?
when HTTP_REQUEST {
if {[HTTP::uri] equals {http://www.abc.com/123}} {HTTP::uri {https://www.123.com/xyz}
...
hoolio
Cirrostratus
Jun 29, 2009Hi Ijaz,
If you want to redirect a client from http to https by sending them a 30x redirect, you can use an iRule like this:
when HTTP_REQUEST {
Check if host header and URI match
if {[string tolower [HTTP::host]] eq "www.abc.com" && [HTTP::path] starts_with "/123"}{
Redirect client to new host and URI
HTTP::redirect "https://www.123.com/xyz"
}
}
If you want to send some requests to one pool via SSL and other requests to another pool without SSL, let me know and I can provide another example.
Aaron
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