Forum Discussion
14 Replies
Sort By
- hooleylistCirrostratusHi Pav,
- Pav_70755NimbostratusThanks Aaron I have about 80 or do re-direct rules in that particular i-rule so I don't want to replace the host header for all of the re-directs just this one in particular?
- hooleylistCirrostratusIs www.abc.com routable through LTM? Is it a server or pool that you can load balance to? Do you want to send requests which you don't rewrite to a different pool?
- Pav_70755NimbostratusYep www.abc.com has just been set up with a dns entry to point to a virtual server on the LTM along with 80 or so other dns entries which require simple http re-directs.
- Pav_70755NimbostratusI've come across this [url=http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/50/afpg/2/aft/32977/aff/5/afv/topic/showtab/groupforums/Default.aspx]thread'>Click Here
when HTTP_REQUEST priority 100 { set http_host [string tolower [string trim [getfield [HTTP::host] ":" 1]]] general URI redirecting switch $http_host { www.domain.com { HTTP::redirect http://www.abc.com/subject } "support.abc.com" { HTTP::redirect http://www.abc.com/subject } return } } }
- hooleylistCirrostratusHi Pav,
when HTTP_REQUEST { Check if requested host is domain.com or www.domain.com switch [string tolower [HTTP::host]] { "www.domain.com" - "domain.com" { Matched the hostname, so rewrite the host header HTTP::header replace Host "www.abc.com" Select different pool for this request? pool www.abc.com_http_pool } } }
- Pav_70755NimbostratusThanks Aaron when i tried that rule i got "Bad Request (Invalid Hostname)
- hooleylistCirrostratusThere are two likely causes of the invalid hostname error. Either the host header replacement is using the wrong value, or the request is going to the wrong pool.
- Pav_70755NimbostratusHi Aaron,
- hooleylistCirrostratusHi Pav,