Forum Discussion
Jeff_Barnett_41
Nimbostratus
Dec 24, 2014URL redirect to another
I am new to the F5 I need to create a simple Irule that redirects one URL to another. here is what I have, that does not work:
when HTTP_REQUEST {
if { (([HTTP::host] equals "abc.com/sonar"))...
Anthony_1648
Nimbostratus
Aug 21, 2017I need a very similar iRule as the first example, but where the case of /sonar can be either /sonar or /Sonar. I tried the second example, but it does not work. I tried to modify the first one to;
when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "abc.com" and [HTTP::path] equals "/sonar" } { HTTP::redirect "https://domain.site.com } else { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } }
But that doesn't work for me. I would appreciate any help or suggestions.
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