Forum Discussion
Bob_10976
May 20, 2011Nimbostratus
Add 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
May 21, 2011Nimbostratus
Hi 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
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