Forum Discussion
mburnham_59608
Aug 07, 2011Nimbostratus
can't rewrite uri
Hi all,
I'm trying to do something which I think is supposed to be very basic, but is failing:
when HTTP_REQUEST {
if { [HTTP::version] eq "1.1" } {
if { [HTTP::header is_keepalive] } {
HTTP::header replace "Connection" "Keep-Alive"
}
HTTP::version "1.0"
}
if {[HTTP::uri] starts_with "/forms/"}{
set new_uri /f5-w-687474703a2f2f6562626f736465762e6d732e636f6d3a37373832$$[HTTP::uri]
HTTP::uri $new_uri
log local0. [HTTP::uri]
}
}
Basically, the uri is never changed - I've verified on the back end. I read something about the uri getting cached - is this something to check? Can I purge the cache?Thanks much,
Mark
- The_BhattmanNimbostratusHi Mark,
HTTP::uri/f5-w-687474703a2f2f6562626f736465762e6d732e636f6d3a37373832$$[HTTP::uri]Bhattman - hoolioCirrostratusHTTP::uri should be working to rewrite the URI. You can log the updated value by using a later priority HTTP_REQUEST event:
when HTTP_REQUEST { if { [HTTP::version] eq "1.1" } { if { [HTTP::header is_keepalive] } { HTTP::header replace "Connection" "Keep-Alive" } HTTP::version "1.0" } if {[HTTP::uri] starts_with "/forms/"}{ HTTP::uri "/f5-w-687474703a2f2f6562626f736465762e6d732e636f6d3a37373832$$[HTTP::uri]" } } when HTTP_REQUEST priority 501 { log local0. [HTTP::uri] }
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