Forum Discussion
Nicolas_Bellen1
Jun 03, 2011Nimbostratus
REGEX Alternatives
I've been trying to figure out how i'd structure a particular portion of my iRule to look for values contained in a string, instead of a regular expression but i'm having some difficulty:
Th...
hooleylist
Jun 03, 2011Cirrostratus
The values for most HTTP:: commands are cached within the same event and priority. If you don't specify an event priority a default of 500 is used. You can use a later priority event (like 501) to view the change from the iRule. Also, the curly braces in string map will prevent command and variable substitution. You can use double quotes instead:
...
if { [HTTP::is_redirect] } {
log local0. "Original Location: [HTTP::header value Location]"
HTTP::header replace Location [string map -nocase "[URI::host [HTTP::header value Location]] def.example.com" [HTTP::header value Location]]
}
}
when HTTP_RESPONSE priority 501 {
log local0. "Updated Location: [HTTP::header value Location]"
}
Aaron
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