Forum Discussion
Rewrite host name to satisfy the web server
I have a simple VS, 2 nodes all default for cisco unity voicemail webservers. We want to use a service name myvoicemail.domain.com but the webservers will only respond to their machine name dc1-cxn-01.domain.local dc1-cxn-domain.local.
How can I configure big-ip to write the machine name for the webserver but leave the browser url as the service name?
- Jad_Tabbara__J1
Cirrostratus
Hello,
Do you want to rewrite only the redirection header or also the body ? If URLs sent by the web server are absolute (not relative) you will need to do it also for the body.
You can do it in many ways :
-
using the an "Rewrite Profile" check this link https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-implementations-11-4-0/21.html
-
using STREAM profile
-
using irule with stream enable / stream disable check the following code
when HTTP_REQUEST { HTTP::header remove "Accept-Encoding" STREAM::disable }
when HTTP_RESPONSE { if { [HTTP::is_redirect] }{ HTTP::header replace Location [string map -nocase [list {"dc1-cxn-01.domain.local" "myvoicemail.domain.com"} {"dc1-cxn-domain.local" "myvoicemail.domain.com"}] [HTTP::header Location]] } if { [HTTP::header value Content-Type] contains "text" || [HTTP::header value Content-Type] contains "xml" } { STREAM::expression [list {@dc1-cxn-01.domain.local@myvoicemail.domain.com@} {@dc1-cxn-domain.local@myvoicemail.domain.com@}] STREAM::enable } }
when STREAM_MATCHED { log local0. "Stream filter matched: [STREAM::match]" }
Hope it helps
Waiting for you feedback
Regards
-
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