Forum Discussion
Bob_10976
Nimbostratus
May 20, 2011Add a Trailing Slash to the URL
Hello all,
I'm needing to covert an ISAPI rule that adds a trailing slash to the end of a url to an iRule, however the tricky part here is i'll need to add in a few exceptions URLs.
For exampl...
The_Bhattman
Nimbostratus
May 20, 2011Hi Bob,
Give this a untested irule a try
The following is a datagroup
class slashblacklist {
"/cart"
}
The following is the iRule.
when HTTP_REQUEST {
set bl [findclass [HTTP::uri] $::slashblacklist]
if { ([HTTP::uri] eq $bl) and (!([HTTP::uri] ends_with "/")) } {
HTTP::uri "[HTTP::uri]/"
}
}
I hope this helps
Bhattman