Forum Discussion
Richard__Harlan
Jul 11, 2005Historic F5 Account
HTTP::uri regex
Haveing a little problem matching a uri in my rule. When a user comes in useing the the following url http://www.deere.com/deerecom/farmers+and+ranchers/publications we want them redirected to redirec...
unRuleY_95363
Jul 11, 2005Historic F5 Account
Because the uri has some special characters, you may want to use "[URI::decode [HTTP::uri]]" instead of just "[HTTP::uri]". This will make sure that any "%2b" strings are converted into '+' before performing the regex match. Also, the + character is a regex special character, so you may want to escape it with \ ('+' means match the preceding character one or more times). As you are not really doing a regular expression but simply a character match, you may alternatively want to simply use "starts_with" as in:
elseif { [URI::decode [HTTP::uri]] starts_with "/deerecom/farmers+and+ranchers/publications" } {
...
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