Forum Discussion
kiamars_51328
Nimbostratus
May 18, 2009How can I get rid of the port on redirects.
Hi, I can redirect to new port, but how can i elemenated the port, I don't want to see the port that I am redirecting.
thx for your time.
hoolio
Cirrostratus
May 19, 2009What port is the virtual server defined on? What port are the pool members defined on? Do the web servers require that the Host header value contain the port number (ie, is the virtual host definition expecting the port to be explicitly listed)?
LTM will translate the port as long as you leave port translation enabled on the virtual server. If you need to, you can rewrite the host header using HTTP::header replace Host "newhost.example.com". Here is an example:
when HTTP_REQUEST {
Check if host header does not have port already
if {[string length [getfield [HTTP::host] ":" 2]] <= 0}{
Append the port to the host header value
HTTP::header replace Host "[HTTP::host]:300"
}
}
If the application includes the port in redirects, you can remove it using the Codeshare example cmbhatt and I linked to above.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
