Forum Discussion
jostar_7866
Nimbostratus
Oct 27, 2014Is there a way to rewrite/translate the links with the contents of a web page?
We are using APM to publish SharePoint externally (using the url Https://sharepoint.company.com), however there are links within the SharePoint content/pages which reference our internal URL (Http://...
Michael__
Nimbostratus
Oct 27, 2014This a is part of the irule we use for SP2013 with APM. Assign an stream profile to the virtual server and an irule similar to the one shown below
Greets Michael
when HTTP_REQUEST_RELEASE {
Disable the stream filter for all requests by default
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"
if {[info exists stream_expr]}{ unset stream_expr }
This we want replace
set stream_expr "@http://sharepoint@https://sharepoint.company.com@"
make sure we have a var to crosscheck before we enable the rewrite in the response
set SPresponse 1
}
}
when HTTP_RESPONSE {
nable the rewrite to fix the hostnames
if {[info exists SPresponse]}{
Check if response type is ...
if {[HTTP::header value Content-Type] contains "application/json" || [HTTP::header value Content-Type] contains "text/html" || [HTTP::header value Content-Type] contains "text/xml"}{
if {[info exists stream_expr]} {
STREAM::expression $stream_expr
STREAM::enable
}
}
}
}
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