Forum Discussion
Joe_Pipitone
Nimbostratus
Jul 20, 2009Simple HTTP Redirection - case sensitive?
Hello all,
I am running Big-IP 9.4.7.
I currently have a variety of redirects in place using string match, however if a user types a URI in upper case, the iRule doesn't work. ...
dennypayne
Employee
Jul 20, 2009Hi,
Just use the "string tolower" command to perform the matches. But you'll have to split the host and URI if you really need to check the host. If "website.org" isn't going to change then just this should work:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] eq "/membership/renew" } {
HTTP::redirect "https://www.website.org/Membership/Renewform.aspx"
}
Otherwise you'll need another "if" statement to check [HTTP:host] using the same logic as well.
Denny
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