Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Simple Rewrite

Afternoon

I am in the process of setting up a simple rewrite migrating from TMG operating in Reverse proxy/load balance roles.

I simply want the F5 to rewrite and load balance an address along the lines of this

public.co.uk > f5 virtual server vip > load balance to nodes (each node is listening for specific header which differs from the external. i.e. internalpublic.co.uk)

I believe I have achieved the desired functionality with a rewrite profile that is '\' and rewrite to http:\internalpublic.co.uk\ (or at least this works as expected).

But is this the correct and best way to achieve this?

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Rewrite profile can be utilized to achieve what you are seeking. If it works, you are on the right path. If you are seeking an alternate option using iRule, consider something similar to this:

when HTTP_REQUEST {
if { [HTTP::host] contains "abcd.com" } {
HTTP::host [string map {abcd.com xyz.com} [HTTP::host]] 
}

when HTTP_RESPONSE {
if { [HTTP::header values Location] contains "xyz.com" } {
HTTP::header replace Location [string map {xyz.com abcd.com} [HTTP::header value Location]]
}
}
0