Forum Discussion
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 { } } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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