Forum Discussion
Tom_Thunem_9204
Nimbostratus
Oct 12, 2009URL redirect when URL is lacking a domain name
Hello,
I have a situation where they want to save the user some typing. They want to redirect http://abc to http://abc.com. Haven't been able to find the syntax for this. All of my r...
hoolio
Cirrostratus
Oct 13, 2009The HTTP::host value is cached, but the update is still done. If you want to see the effect of the change you could either check the server logs or log the value in a later priority HTTP_REQUEST event:
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] request to [HTTP::host][HTTP::uri]"
Check if host is chargeit-test
if { [HTTP::host] eq "chargeit-test" } {
log local0. "[IP::client_addr]:[TCP::client_port]: Replacing host header."
Replace the Host header
HTTP::header replace "Host" "chargeit-test.avnet.com"
}
}
when HTTP_REQUEST priority 501 {
log local0. "[IP::client_addr]:[TCP::client_port]: (501) [HTTP::method] request to [HTTP::host][HTTP::uri]"
}
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
