Forum Discussion
jgrohol_43248
Nimbostratus
Jun 28, 2010Port Translation
I've been struggling all day with this one... I have two separate problems and not sure if they are related.
1. I have a VS configured to listen on an IP and on port HTTP 80. I have it attac...
jgrohol_43248
Nimbostratus
Jun 29, 2010That worked...
I've added to it to make it even more dynamic. I'm grabbing the FQDN from the HTTP request and changing the hostname to it.
when HTTP_REQUEST {
set ext_fqdn "[HTTP::host]"
}
when HTTP_RESPONSE {
Check if response is a redirect
if {[HTTP::is_redirect]}{
Replace the hostname in the Location header with the external FQDN
HTTP::header replace Location [string map -nocase "[URI::host [HTTP::header Location]] $ext_fqdn" [HTTP::header Location]]
}
}
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