Forum Discussion
shaggy
Nov 13, 2014Nimbostratus
This ought do it - if the URI is more than one character in length and the URI ends with /, the iRule will redirect to the same URI with all right-most /'s stripped. abc.com/test/// will redirect to abc.com/test
when HTTP_REQUEST {
if { [string length [HTTP::uri]] > 1 and [string tolower [HTTP::uri]] ends_with "/" } {
HTTP::redirect http://[HTTP::host][string trimright [HTTP::uri] "/"]
}
}