Forum Discussion
HTTP rewrite with uri modification
will that above irule works transparently ? because client is not willing to publish the redirector website in dns.
There is no physical redirect involved in this iRule. It is simply sending all traffic to the defined server pool with a different host header so that the web server can redirect the traffic (locally) to the correct website based on host header injection. The client will remain on the one URL.
i've added http response to avoid dns lookup of redirector so while responding back to client it will be from aportal
I see. The redirector website will respond with its own Host value and you want the client to see the originally-requested Host value. For that, re-add the set hostname [HTTP::host] line in the HTTP_REQUEST event, and then simply change the Host header in the HTTP_RESPONSE event.
when HTTP_RESPONSE {
if { [info exists hostname] } {
HTTP::header replace Host $hostname
}
}
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