Forum Discussion
Darren_Walker_2
Cirrus
Apr 18, 2018Enable compression of two or more adjacent slashes in a URI into a single slash.
Nginx has a merge_slashes module that will evaluate a URI like "/foo; and change it to "/foo/bar/foobar?slashes=many". But our IIS websites just display the browser URL the way the user input it: Our...
crodriguez
Apr 19, 2018Ret. Employee
You might be able to use something like this:
when HTTP_REQUEST {
if { [HTTP::uri] contains "//" } {
set URIquals [split [HTTP::uri] "/"]
set newURI ""
foreach qual $URIquals {
if { $qual ne "" } {
append newURI "/" $qual
}
}
HTTP::uri $newURI
}
}
I ran a small test using your input string above:
Before URI: /foo
After URI: /foo/bar/foobar?slashes=many
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