Forum Discussion
Simple HTTP session termination then back end session to web server
The port translation is done automatically in a standard virtual server configuration (with port translation enabled), so the destination port will change to port defined in the server pool. As for the the host and URL, something like this perhaps:
when HTTP_REQUEST {
if { [TCP::local_port] equals "8052" } {
HTTP::header replace Host "currenturl.olddomain.local"
HTTP::uri "/webapp"
}
}
This will change the incoming Host header and send all requests to the "/webapp" URI path. This VERY simplistic example assumes that:
-
The "/webapp" URI is the only path (ie. there's nothing after this URI like "/webapp/foo"). A fairly simple fix.
-
The web server isn't responding to client requests with object references that point to the internal URL structure (ex. "http://currenturl.olddomain.local/webapp/image.jpg"). This is somewhat rare, but good to look out for.
Recent Discussions
Related Content
* 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