Rajesh_74831
Nov 12, 2014Nimbostratus
Want to remove "/" at the end of uri
Hi All,
We wanted to create an irule which should remove "/" from the uri.
Something like if user tries /">http://abc.com/xxxx/ it should be redirected to http://abc.com/xxxx .
I tried following irule but its not working.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] ends_with "/" } {
log local0. "Incoming request = [HTTP::host][HTTP::uri]"
set uri [string map -nocase {"/" ""} [HTTP::uri]]
log local0. "New URI = $uri"
HTTP::uri $uri
}
}
Thanks -Rajesh