Forum Discussion
Pedro_Minas
Nimbostratus
Jul 06, 2010Reverse Proxy Problems
Hello
I'm trying to create a reverse proxy in my F5 BIG-IP. I'm having problems with the redirection to another port.
What i'm doing is this...
the user connects to a VS ...
Michael_Yates
Nimbostratus
Jul 08, 2010There is another minor tweak that you need to do:
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] request to host [HTTP::host] and URI [HTTP::uri]"
if { [string tolower [HTTP::host]] equals ""xpro.xx.tt" } {
if { [string tolower [HTTP::uri]] ne "/teste/tt/rr" } {
HTTP::redirect http://xpro.xx.tt/teste/tt/rr
}
}
}
Change this: if { [string tolower [HTTP::host]] equals ""xpro.xx.tt" } {
To this: if { [string tolower [HTTP::host]] equals "/xpro.xx.tt" } {
I would still suggest using starts_with: if { [string tolower [HTTP::host]] starts_with "/xpro.xx.tt" } {
The [HTTP::uri] starts with a "/" so you have to include it. I believe that you must include it for "equals" and "starts_with", but not with "contains".
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