Forum Discussion
Dachicourt_Fabi
Nimbostratus
Jan 07, 2005Using format strings in version 9
the string %h %p et %u don't work on version 9
for exemple, a rule like
rule my_rule {
if ([HTTP::uri] ends_with "baz") {
redirect to "https://%h:8080/%u/" ...
bl0ndie_127134
Feb 21, 2005Historic F5 Account
HTTP::uri returns the URI that is sent on the GET/POST request. This normally means that it will not have the protocol or host strings, at least not in the same way the user may have typed into the user agent. The exception being proxy requests, which will have the full URI.
We added bunch of utility of functions that make the URI parsing easy, please see below for the brief explanations. One thing to note though, after a long discussion with rapMaster_c, drTeeth, unRuly (last names omitted as a professional courtesy), we decided to chose ‘URI::path’ to carry the spirit of UNIX where you need to use ‘basename’ and path to get the actual document. There is a good example of this on one of my earlier postings for making BigIP behave like an http proxy. Here is the link to the posting … http://devcentral.f5.com/default.aspx?tabid=28&view=topic&forumid=5&postid=1332
URI::protocol Extracts the protocol part from the URI string that you specify.
URI::basename Extracts the basename part from the URI string that you specify.
URI::path Extracts the path from the URI string that you specify.
URI::query Extracts the query part from the URI string that you specify.
URI::host Extracts the host part from the URI string that you specify.
URI::compare Compares URIs as recommended by RFC 2616 section 3.2.3.
URI::decode Returns the decoded URI string.
URI::encode Returns the encoded URI string
URI::port Extracts the port part from the URI string that you specify.
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