Forum Discussion
marlon_Gino-gi1
Nimbostratus
Feb 11, 2008Irules Redirect not working if you change case on the filename
hello,
would like to know if redirects configured on the F5 are case sensitive when the redirect is made at the file level?
As an example:
A redirect of the page: https://www.test.com/Pages/TEST.aspx to https://www.test.com/Pages/TEST1.aspx will work. But if you try to use the redirect by changing the case of the file name it will not work (…../Pages/test.aspx).
Is there any Irules redirect that would handle all case possibilities?
3 Replies
- kykong_107132
Nimbostratus
Hi,
you can try to use "toupper", it will convert the string to upper case. following is the sample,
when HTTP_REQUEST {
if { [string toupper [HTTP::uri]] contains "test.aspx" } {
HTTP::redirect "https://www.test.com/Pages/TEST1.aspx"
}
}
regards,
KY - kykong_107132
Nimbostratus
Hi,
you can try to use "toupper", it will convert the string to upper case. following is the sample,
when HTTP_REQUEST {
if { [string toupper [HTTP::uri]] contains "TEST.aspx" } {
HTTP::redirect "https://www.test.com/Pages/TEST1.aspx"
}
}
regards,
KY - hoolio
Cirrostratus
As KY suggests, you can use the string toupper (or string tolower) command to change the case of a string. It would be good to change the entire case of the string you're making the comparing with:
if {[string tolower [HTTP::path]] ends_with "/test.aspx"}{
or
if {[string toupper [HTTP::path]] ends_with "/TEST.ASPX"}{
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