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 16, 2014Ok this will do what you need. You do not need to specify the entire host as the browser will use the existing site name if you only supply just the URI in the redirect.
when HTTP_REQUEST {
if {!([HTTP::path] ends_with "/")} {
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