Forum Discussion
meena_60183
Nimbostratus
Feb 07, 2008Hide port numbers on the URL
I need some help in configuring an iRule to hide a port number on the URL. I am very new to the F5 world.
I have a URL
http://10.35.253.131:8080
and I need to redirect t...
hoolio
Cirrostratus
Feb 07, 2008You should be able to define the VIP on the port you want clients to make requests to and the pool members on whatever port the web server listens on. Just make sure port translation is enabled on the VIP (which it is by default).
If the web servers send redirects with the wrong port in the Location field, you can use an iRule to replace that with the VIP's IP/port:
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "3" } {
HTTP::header replace Location [string map -nocase {myold.hostname.com:8081 mynew.hostname.com:8080} [HTTP::header Location]]
}
}Or you can try using the rewrite redirects option on the HTTP profile. Check these related solutions on AskF5 for details/known issues (Click here and Click here).
If the servers include absolute references to the incorrect IP and/or port in response content (the html), check the last example on the STREAM::expression wiki page (Click here) for details on how to perform the replacement in content as well.
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
