Back to iRules
when HTTP_REQUEST { if { ([HTTP::uri] eq "/directory") and (!([HTTP::uri] ends_with "/")) } { HTTP::uri "[HTTP::uri]/" } }