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 ...
Damion_19248
Nimbostratus
Feb 04, 2013Thanks for you response. I got the following error when I tried to create the rule. Is it compatible with 9.x code or is this 10-11x?
1:3: Rule [RemoveTrailingSlashes] error:
line 1: [wrong args] [when HTTP_REQUEST ]
line 2: [undefined procedure:
if { not ( [HTTP::uri] equals "/" ) and ( [HTTP::uri] ends_with "/" ) }
{
HTTP::uri [string trimright [HTTP::uri] "/"]
}
] [{
if { not ( [HTTP::uri] equals "/" ) and ( [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