Forum Discussion
Wolf46_144992
Nimbostratus
Jun 16, 2014Append text to a URI
Hi Guys,
I am currently trying to append a "/" at the end of a URI provided that the user himself did not include this in the first place.
I am currently using the below iRule:
when HT...
Kevin_Davies_40
Nacreous
Jun 18, 2014Yes good catch. Use this updated iRule
iRule to add a slash to requests
when HTTP_REQUEST {
skip files
if {[HTTP::path] contains "."} { return }
already ends in a slash
if {[HTTP::path] ends_with "/"} { return }
HTTP::path "[HTTP::path]/"
HTTP::redirect [HTTP::uri]
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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