Forum Discussion
Malcolm_Salmons
Nimbostratus
Sep 07, 2005Addition of trailing slash to url
Hi
I have a pair of big-ip set up with a virtual server configured. The big-ip's terminate ssl traffic and forward the request as http. Everything work fine when I go to the basic url say: ...
Sep 07, 2005
You can use the ends_with operator. If it does not end with a slash, then you can use the builtin "append" operator and then reset the URI with the HTTP::uri command.
when HTTP_REQUEST {
set uri [HTTP::uri]
if { ! ( $uri ends_with "/" ) } {
append uri "/"
HTTP::uri $uri
}
}
You might want to be careful that you don't append slashes to file requests though (ie. http://server/foo.gif).
Generally the webserver has a builtin way to redirect directory based requests that might be more foolproof.
-Joe
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