Forum Discussion
Mike_Graston_10
Nimbostratus
Oct 18, 2006Case sensitivity
I have setup a rule to redirect based on a uri string in the request. I also had to add them in both Upper and lower case. I know there is a way to set this up to shorten the Irule and Have tried adding it several different ways. Some came up with error while trying to apply it like switches is invalid other just didn't work. I finally got this one to work but would like to know why i can't change it to lower case then redirect based on that.
when HTTP_REQUEST {
if { [HTTP::uri] contains "app2"} {
HTTP::redirect "https://website.com/app2/"
}
elseif { [HTTP::uri] contains "app1"} {
HTTP::redirect "https://website.com/app1/"
}
elseif { [HTTP::uri] contains "APP2"} {
HTTP::redirect "https://website.com/app2/"
}
elseif { [HTTP::uri] contains "APP1"} {
HTTP::redirect "https://website.com/app1/"
}
else {
pool www-website-com-http
}
}
- Mike_Graston_10
Nimbostratus
Got thanks for the help1
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