F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

Forum Discussion

Ashish_Ram_Tak1's avatar
Ashish_Ram_Tak1
Icon for Nimbostratus rankNimbostratus
Oct 15, 2014

Redirect to different URL without changing the existing URL on internet

Hello All,

 

I have one request where I need to redirect 4 different URL's (Http--> https) and (Https--> internet URL) to one URL hosted on internet but user will see only the original URL and not the replaced one, I have below iRule in place which is not working currently, request you to please help me over here.

 

when RULE_INIT { set doSSL 0 } when HTTP_REQUEST { HTTP::header remove "Accept-Encoding" switch [string tolower [HTTP::host]] { "xyz.abc.com" { if {([HTTP::path] eq "/")} { HTTP::header replace Host "barrycallebaut.force.com" HTTP::uri "/shop/" } } "pqr.abc.com" { if {([HTTP::path] eq "/")} { HTTP::header replace Host "barrycallebaut.force.com" HTTP::uri "/shop/" } } "mnp.abc.com" { if {([HTTP::path] eq "/")} { HTTP::header replace Host "barrycallebaut.force.com" HTTP::uri "/shop/" } } "dfi.abc.com" { if {([HTTP::path] eq "/")} { HTTP::header replace Host "barrycallebaut.force.com" HTTP::uri "/shop/" } } default { } } }