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:
www.test.com
However when I try to go to any directories, e.g.
www.test.com/test
I get the error - page cannot be displayed. However, when I added a trainling slash, i.e.
www.test.com/test/
Everything works fine. Does anybody know if I can add a trailing slash using irules and if so what I would need to specify in the rule.
Thanks in advance
Malcolm
- 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 } }
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