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"
}
But what I am looking to do is ONLY have it look past the domain name, for example "http://www.myurl.com/ecommerce". But it is actually redirecting even if "ecommerce" is anywhere in the URL. Like "http://www.myurl.com/um/user/showUserRegister.do?hello=ecommerce". How can I ONLY have it look directly after the domain?
Thanks,
Mike
- Deb_Allen_18Historic F5 AccountHi Mike -
if (getfield (http_uri, '?', 1) contains "ecommerce") { redirect to "https://%h/%u" }
- Mike_Pones_6391
Nimbostratus
deb, thanks for the quick reply. - Deb_Allen_18Historic F5 AccountGeneric URI syntax uses the ? character to delimit the start of the query string.
http://www.example.com:8042/over/there?name=ferretnose \__/ \__________________/\_________/ \_________/ \___/ | | | | | scheme authority path query fragment
- Mike_Pones_6391
Nimbostratus
Interesting I did not know that. I will give this a shot.
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