The title of the HTML page isn't part of any HTTP header. It's part of the document that's being returned by the webserver. So you'll need to enable the STREAM profile and use it to parse the response. The iRule below shows how to extract the title.
when HTTP_REQUEST {
# Disable the stream filter by default
STREAM::disable
# LTM does not uncompress response content, so if the server has compression enabled
# and it cannot be disabled on the server, we can prevent the server from
# sending a compressed response by removing the compression offerings from the client
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
# Check if response type is text
if {[HTTP::header value Content-Type] starts_with "text"} {
# match <title>...</title>
STREAM::expression {=<title>[A-Za-z0-9\.\-]+==}
# Enable the stream filter for this response only
STREAM::enable
}
}
when STREAM_MATCHED {
# extract the title
set title [string range [STREAM::match] 7 end]
log local0.info "Title: $title"
}