Forum Discussion
matt1985_299432
Nimbostratus
Sep 25, 2017Redirect with URI rewrite setting lowercase URI and removing trailing /
Hi,
I am after some assistance. Essentially I have the requirement to change the URI which is passed to the server. i.e. client requests /content/content server gets /site/path/content/content...
Faruk_AYDIN
Altostratus
Sep 25, 2017Hi Guy,
Try this iRule:when HTTP_REQUEST {
if {[string tolower [HTTP::uri]] ne [HTTP::uri] && [string tolower [HTTP::uri]] starts_with "/content/"} {
HTTP::redirect "/site/path[HTTP::uri]"
}
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