Forum Discussion
Mike_Pones_6391
Nimbostratus
Jun 01, 2006HTTP_URI Lookup Problem
I currently have a rule setup to look for the word "ecommerce" and then make a redirect to HTTPS. Here is the rule:
if (http_uri contains "ecommerce") {
redirect to "https://%h/%u"
...
Deb_Allen_18
Jun 01, 2006Historic F5 Account
Hi Mike -
You can use the "getfield" function to split the URI string into 2 parts, split on the "?" character:
if (getfield (http_uri, '?', 1) contains "ecommerce") {
redirect to "https://%h/%u"
}(v9 introoduced a new command "HTTP::path" to extract only the URI path & filename without the trailing query parameters)
HTH
/deb
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
