Forum Discussion
tarma_58716
Nimbostratus
Jun 12, 2011split port url in the https class redirection
Hi i've a httpclass wich redirect the client to a new URL:
profile httpclass localhost_redirect {
defaults from httpclass
pool none
redirect "http://172.x.x.x:"2131" ...
nitass
Employee
Jun 12, 2011i agree with john. i don't think it's possible to hide port number in http redirection.
by the way, why don't u send traffic to pool based on host header instead of redirection?
for example
[root@tulip:Active] config b virtual bar80 list
virtual bar80 {
destination 172.28.17.88:http
ip protocol tcp
rules myrule
profiles {
http {}
tcp {}
}
}
[root@tulip:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[HTTP::host] eq "old.host"} {
HTTP::redirect "http://new.host[HTTP::uri]"
} else {
snat automap
pool foo
}
}
}
curl -I http://old.host/test/
HTTP/1.0 302 Found
Location: http://new.host/test/
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
curl -I http://new.host/test/
HTTP/1.1 200 OK
Date: Sun, 12 Jun 2011 14:51:55 GMT
Server: Apache/2.0.59 (rPath)
Last-Modified: Tue, 12 Oct 2010 19:17:25 GMT
ETag: "13094-51-53b1db40"
Accept-Ranges: bytes
Content-Length: 81
Vary: Accept-Encoding
Content-Type: text/html; charset=UTF-8
the old.host and new.host are mapped to the same vip i.e. 172.28.17.88.
cheer!
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