Forum Discussion
hooleylist
Dec 16, 2010Cirrostratus
Another option would be to name the virtual server with the FQDN that is in DNS and then parse [virtual name] to get the correct hostname. You could avoid manually configuring the IP to hostname mappings with this. A caveat is that you can't rename virtual servers via the GUI. The example below uses the virtual server name up to the first underscore:
virtual www.example.com_http_vs {
destination 10.1.0.15:80
ip protocol tcp
rules vs_name_to_redirect_rule
profiles {
http {}
tcp {}
}
}
when HTTP_REQUEST {
log local0. "parsed https://[getfield [virtual name] _ 1][HTTP::uri]"
HTTP::redirect "https://[getfield [virtual name] _ 1][HTTP::uri]"
}
Aaron