Forum Discussion
website a is referecing website b - how do I handle this on the ltm
hi kevin it is not published externally on the ltm/apm
hmmm - apm portal solution? This is a special licensed option - isn't it?
the irule we use simple takes and replaces the external with the internal url (uri):
Code for the iRule DK_AE_IP_Based_VirtualHost:
when HTTP_REQUEST { Log debug messages to /var/log/ltm? 1=yes, 0=no. set host_debug 1
Need to force the host header replacement and HTTP:: commands into the clientside context as the HTTP_REQUEST_SEND event is in the serverside context
if {$host_debug}{log local0. "[HTTP::host]: [HTTP::method] request to [HTTP::host][HTTP::uri]"}
Look up the selected server name in the datagroup to get the right pool
set pool_name_value [class match -value [HTTP::host] equals /dk_dmz/DK_AE_IP_pools_dg]
if {$host_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Looked up [HTTP::host], found: $pool_name_value."}
Check if the lookup returned a value
if {$pool_name_value ne ""}{
Replace pool
pool $pool_name_value
if {$host_debug}{log local0. "[HTTP::host]: Replaced default pool with $pool_name_value."}
}} Similar with the iRule for DK_AE_HostHEaderRewrite – here is the code:
when HTTP_REQUEST_SEND { Log debug messages to /var/log/ltm? 1=yes, 0=no. set host_debug 1
Need to force the host header replacement and HTTP:: commands into the clientside context as the HTTP_REQUEST_SEND event is in the serverside context clientside {
if {$host_debug}{log local0. "[HTTP::host]: [HTTP::method] request to [HTTP::host][HTTP::uri]"}
Look up the selected server name in the datagroup to get the host header value
set host_header_value [class match -value [HTTP::host] equals /dk_dmz/DK_AE_host_rewrite_dg]
if {$host_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Looked up [HTTP::host], found: $host_header_value."}
Check if the lookup returned a value
if {$host_header_value ne ""}{
Replace the host header value
HTTP::header replace Host $host_header_value
if {$host_debug}{log local0. "[HTTP::host]: Replaced Host header with $host_header_value."}
}} }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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