Forum Discussion
Damion_19248
Nimbostratus
Feb 02, 2013Remove trailing slash
I need to remove any trailing slashes off any url that come in.
www.mydomain.com/category/ - -> www.mydomain.com/category
www.mydomain.com/place/ --> www.mydomain.com/place
etc ...
Kevin_Stewart
Employee
Feb 04, 2013Something like the following should work:
when HTTP_REQUEST {
if { [HTTP::uri] ends_with "/" } {
HTTP::uri [string trimright [HTTP::uri] "/"]
}
}
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