Forum Discussion
Beatty754_27919
Nimbostratus
Jul 15, 2016URI Rewrite based on cookie value
Hey Devcentral,
I'm trying to come up with the best way to modify a URI based on a cookie value. I have control over the cookie value and would prefer to just do a simple string replace and repl...
Vijay_E
Cirrus
Jul 15, 2016I am not sure if it will work but I think you are looking for something like this:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "abc.com" } {
HTTP::uri [string map -nocase {"abc.com" "abc-[HTTP::cookie value cookie-name].com"} [HTTP::uri]]
}
}
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