Forum Discussion
Fereda_187281
Nimbostratus
Oct 27, 2015URI Translation and redirect help
Hello all;
I am using the BigIP v 11.6.
My users will in the browser put (https://abc-abc.abc.com/abc/example.asp=1) my redirect states
redirect to "https://backendserver/xyc/example.asp=1...
- Oct 27, 2015
In that case you don't want to be doing a redirect you are wanting to rewrite the host, uri, and links. You can use proxypass for this, https://devcentral.f5.com/codeshare/proxypass-v10-v11 or your own iRule that could look something like this.
when HTTP_REQUEST { if {[string tolower [HTTP::host]] equals "abc-abc.abc.com"}{ HTTP::host "backendhostheader" } HTTP::uri [string map {/abc/ /xyc/} [HTTP::uri]] Disable the stream filter for all requests STREAM::disable LTM does not uncompress response content, so if the server has compression enabled and it cannot be disabled on the server, we can prevent the server from sending a compressed response by removing the compression offerings from the client HTTP::header remove "Accept-Encoding" } when HTTP_RESPONSE { Replace http:// with https:// STREAM::expression {@backendserver@abc-abc.abc.com@ @/xyc/@/abc/@} Enable the stream filter for this response only STREAM::enable } }
Brad_Parker_139
Nacreous
Oct 27, 2015In that case you don't want to be doing a redirect you are wanting to rewrite the host, uri, and links. You can use proxypass for this, https://devcentral.f5.com/codeshare/proxypass-v10-v11 or your own iRule that could look something like this.
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "abc-abc.abc.com"}{
HTTP::host "backendhostheader"
}
HTTP::uri [string map {/abc/ /xyc/} [HTTP::uri]]
Disable the stream filter for all requests
STREAM::disable
LTM does not uncompress response content, so if the server has compression enabled
and it cannot be disabled on the server, we can prevent the server from
sending a compressed response by removing the compression offerings from the client
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
Replace http:// with https://
STREAM::expression {@backendserver@abc-abc.abc.com@ @/xyc/@/abc/@}
Enable the stream filter for this response only
STREAM::enable
}
}
Fereda_187281
Nimbostratus
Oct 27, 2015Brad remarkeble!!
It is working.But My Vip settings had not got stream check.it was selected none before so i was put the line which starts stream. Is it correct way?I think in this case te response uri include backend server hostname. So how can i hide the response?
Thanks again..
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
