Forum Discussion
8 Replies
Sort By
- hooleylistCirrostratusHi Bruce,
when HTTP_REQUEST { Check if some condition is true? if { [string tolower [HTTP::host]] eq "search.environment.domain" and [HTTP::path] eq "/listing" and [HTTP::query] contains "Ntt"}{ Rewrite the URI with the original path and the query string replaced with just the Ntt parameter value set for the q parameter HTTP::uri "/globalSearch?q=[URI::query "?&[HTTP::query] &Ntt]" Update the host header HTTP::header replace Host "www.environment.domain" } }
- Bruce_Walker_11Nimbostratus
Hi Aaron,
when HTTP_REQUEST { Check if some condition is true? if { [string tolower [HTTP::host]] eq "search.devint.lpo" and [HTTP::path] eq "/listing" and [HTTP::query] contains "Ntt"} { Log the original Host and URI request log local0. "Original Client Request is: [HTTP::header value host][HTTP::uri]" Rewrite the URI with the original path and the query string replaced with just the Ntt parameter value set for the q parameter HTTP::uri "/globalSearch?q=[URI::query "?&[HTTP::query] &Ntt"]" Update the host header HTTP::header replace Host "www.devint.lpo" Log the modified Host and URI log local0. "Modified Client Request is: [HTTP::header value Host][HTTP::uri]" } }
- Bruce_Walker_11NimbostratusFYI- It's BIG-IP Version 9.4.7 320.1
- hooleylistCirrostratusHi Bruce,
when HTTP_REQUEST { Check if some condition is true? if { [string tolower [HTTP::host]] eq "search.devint.lpo" and [HTTP::path] eq "/listing" and [HTTP::query] contains "Ntt"} { Log the original Host and URI request log local0. "Original Client Request is: [HTTP::header value host][HTTP::uri]" Rewrite the URI with the original path and the query string replaced with just the Ntt parameter value set for the q parameter HTTP::uri "/globalSearch?q=[URI::query "?&[HTTP::query] &Ntt"]" Update the host header HTTP::header replace Host "www.devint.lpo" } } when HTTP_REQUEST priority 501 { Log the modified Host and URI log local0. "(501) Modified Client Request is: [HTTP::header value Host][HTTP::uri]" }
- Kevin_Davies_40NacreousAaron,
when HTTP_REQUEST { if it matches the request replace the request with a new one passing the old parameter. if { "[HTTP::host]/[HTTP::path]?[HTTP::query]" starts_with "search.devint.lpo/listing?Ntt=" } { HTTP::host "www.devint.lpo" HTTP::uri [concat "/globalSearch?q=" [URI::query "?[HTTP::query]" "Ntt"]] } } when HTTP_REQUEST priority 501 { ...as above... }
- hooleylistCirrostratusHi Kevin,
- Bruce_Walker_11NimbostratusHi Aaron and Kevin,
- hooleylistCirrostratusHi Kev,