Forum Discussion
Michael_Yates
Nimbostratus
Nov 14, 2006URI Rewrite for Server Pool
I have an issue which after reviewing numerous other posts...isn't covered.
I have a site connected to a server pool that is accessed by a normal URL (http://website.domain.com), but returns the server name, access port, and directory (http://servername:5555/directory).
The problem is that I need the Server Name Portion stripped on the return to the Browser, but the IRule needs to be able to do this for a Server Pool of 2 or more servers.
In addition anything past the URI / must remain unchanged. I've tried several solutions the following being the last to no avail.
when HTTP_RESPONSE_CONTINUE {
set newhost "http://website.domain.com"
if { [HTTP::header host] contains "servername:5555/" } {
HTTP::header replace host $newhost
}
}
Can someone help me or point me in the right direction?
- A few corrections. In the HTTP protocol, the server does not return a server name and location as part of the HTTP response.
HTTP::header replace "Host" "servername:5555"
HTTP::uri "/directory[HTTP::uri]"
- bob_chen_103251
Nimbostratus
ok
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