Forum Discussion
DNS queries flapping between external and internal vIPs even if the source requests is internal.
1:if I use tcp::collect 50 to collect first 50 bytes,then I wanna extract 21-22 bytes via tcp::payload
how to achieve this?
2:tcp::payload 2 means take first 2bytes from payload,right?
3:in the tcp::payload size
Returns the accumulated TCP data content. If is specified, and more than bytes are available, only the first bytes of collected data are returned.
what does "If is specified, and more than bytes are available, only the first bytes of collected data are returned If is specified, and more than bytes are available, only the first bytes of collected data are returned" mean?
- nitass_89166May 30, 2014
Noctilucent
I am redirecting a https request when uri /ExampleWeb* is requested it is changed to /ExampleWeb/test* then is being redirected to http.
if i understand correctly, you do not need HTTP::redirect command. you just create http pool and assign to virtual server.
The issue I am having is that when it is being redirected using [http::host] the server in the pool doesn't have the host in its directory.
you can use HTTP::header to change host header value.
HTTP::header replace Host (new host header value)
- rjones_01_14578May 30, 2014
Nimbostratus
Thanks nitass. This is what I ended up using. There is probably a better cleaner way to do this (I'm new to irules) but it is working as expected now. when HTTP_REQUEST { if {[HTTP::uri] contains "/ExampleWeb"}{ log "Requested URL is [HTTP::host][HTTP::uri]" HTTP::uri [string map {"/ExampleWeb" "/ExampleWeb/test"} [HTTP::uri]] switch -glob [HTTP::path] { "ExampleWeb/test*" { virtual test-instance-80 } } } }
I am redirecting a https request when uri /ExampleWeb* is requested it is changed to /ExampleWeb/test* then is being redirected to http.
if i understand correctly, you do not need HTTP::redirect command. you just create http pool and assign to virtual server.
The issue I am having is that when it is being redirected using [http::host] the server in the pool doesn't have the host in its directory.
you can use HTTP::header to change host header value.
HTTP::header replace Host (new host header value)
- rjones_01_14578May 30, 2014
Nimbostratus
Thanks nitass. This is what I ended up using. There is probably a better cleaner way to do this (I'm new to irules) but it is working as expected now. when HTTP_REQUEST { if {[HTTP::uri] contains "/ExampleWeb"}{ log "Requested URL is [HTTP::host][HTTP::uri]" HTTP::uri [string map {"/ExampleWeb" "/ExampleWeb/test"} [HTTP::uri]] switch -glob [HTTP::path] { "ExampleWeb/test*" { virtual test-instance-80 } } } }