Forum Discussion

hgaa_174869's avatar
hgaa_174869
Icon for Nimbostratus rankNimbostratus
Nov 28, 2014

Virtual Server redirecting with iRule with a domain form

I have a Virtual Server(10.72.5.179) and this is redirecting to my Server(10.72.1.170). This Server is running a application that only accept the redirection in the form of a domain and not IP.

 

How can I do in order to have the redirection in the domain form(MySecondDomain.com) and that this should not change the original domain(MyFirstDomain.com). -This is the reason that we are not doing a redirect-

 

Best Regards,

 

Harold Angulo

 

2 Replies

  • you can rewrite host header when sending traffic to server/pool member using "HTTP::header replace" or "HTTP::host" (in 11.5+) command. HTTP::header   https://clouddocs.f5.com/api/irules/HTTP__header.html HTTP::host https://clouddocs.f5.com/api/irules/HTTP__host.html anyway, if server hard-codes hostname (MySecondDomain.com) in response, you have to rewrite it back to original (MyFirstDomain.com) when sending the response to client (e.g. irule, stream profile, etc).