Forum Discussion
Ravi_Kakran
Nimbostratus
Jun 20, 2019IRule condtion for one mor more slashes in URL
Hi, I am working on website where we use F5 server to set some irules for application URLs. Recently we noticed that application URL is breaking if we put more than one forward slashes (/) at t...
JG
Cumulonimbus
Jun 21, 2019This should reduce all trailing slashes to one only, but I haven't tested it yet:
when HTTP_REQUEST {
if { [HTTP::uri] ends_with "//" } {
set new_uri [string trimright [HTTP::uri] '/']
HTTP::uri "$new_uri/"
}
if { [HTTP::uri] equals "/" } {
HTTP::redirect "https://[HTTP::host]/web/guest/cna/home"
}
} [Edited]
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
