demmo_251289
Nimbostratus
May 31, 2016Solved
redirect for uppercase URI
Hello, I have a issue with a redirect, part of the URI is uppercase /something/somethingelse/NEW/index.html, and I'd like to redirect to lower /something/somethingelse/new/index.html
Now, if I do string tolower [HTTP::uri] ends_with "/new/" it works, but if I try /something/somethingelse/NEW/index.html it wouldn't redirect because the rule matches only /new/
How can I work this around ?
Thank you
If you know which part of the uri is uppercase, you can change the if condition like below :
when HTTP_REQUEST { if { [HTTP::path] contains "/NEW/"} { HTTP::redirect [string tolower [HTTP::uri]] } }