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...
Tom_Thunem_9204
Nimbostratus
Oct 13, 2009here's what I have thus far. Same results if I use double-quotes around Host in replace statement.
when HTTP_REQUEST {
Check if host is chargeit-test
if { [HTTP::host] eq "chargeit-test" } {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] request to [HTTP::host][HTTP::uri]"
log local0. "[IP::client_addr]:[TCP::client_port]: Replacing host header."
Replace the Host header
HTTP::header replace Host "chargeit-test.avnet.com"
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] after rewrite [HTTP::host][HTTP::uri]"
}
}
Oct 13 08:49:49 tmm tmm[1637]: Rule chargeit-logging : 10.64.33.42:2589: GET request to chargeit-test/
Oct 13 08:49:49 tmm tmm[1637]: Rule chargeit-logging : 10.64.33.42:2589: Replacing host header.
Oct 13 08:49:49 tmm tmm[1637]: Rule chargeit-logging : 10.64.33.42:2589: GET after rewrite chargeit-test/
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
