Forum Discussion
JRahm
Aug 16, 2006Admin
Sorry about that..I thought setting the host with that command was valid. Try this (I'm assuming you have a pool assigned in the vip?):
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/index.php"} {
log "Requested URL is [HTTP::host][HTTP::uri]"
HTTP::uri "/livestrongportfolios[HTTP::uri]"
HTTP::header replace "Host" "www.americancentury.com"
log "New URL is [HTTP::host][HTTP::uri]"
} else {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
I'm still a little foggy on when these values are actually set, and I think it varies depending on the command, so if you are getting the same value with the second log statement in the HTTP_REQUEST event, try putting the second log statement in the HTTP_REQUEST_SEND event instead:
when HTTP_REQUEST_SEND {
log local0. "New URL is [HTTP::host][HTTP::uri]"
}