Forum Discussion
HTTP::header replace Host rewrite
Hello,
I'm trying to rewrite the Host header such that the client is silently redirected to a host and the browser retains the original URL.
When I try this, I get a reset (presumably from abc.com). A redirect to abc.com works just fine.
Please help-thanks!
when HTTP_REQUEST_SEND {
HTTP::header replace Host "abc.com"
}
- eastmanpdx
Nimbostratus
Good question. I Saw HTTP_REQUEST_SEND in an example and decided to give it a try. I've also tried HTTP_REQUEST.
- nathe
Cirrocumulus
Might I suggest a packet capture to see what's going on? or add logging to the irule, you should be able to use the priority command and log before and after you http header change.
Hope this helps,
N
- eastmanpdx
Nimbostratus
Thanks, nathe! I ran a tcpdump and saw that the LTM was sending a reset to the client due to their not being any pool members. This means that we were never taken to the page specified by the rewrites. I have attempted to implement this with Local Traffic Policies, irules and finally, a rewrite profile to no avail. I will be opening a case with F5 support.
- nathe
Cirrocumulus
Just to confirm, are you looking to rewrite the host header or actually redirect the client to a different host behind a different vip?
- eastmanpdx
Nimbostratus
Just to be clear, I'm attempting to replace a redirect with a mechanism that takes the user to a different page completely transparently without the URL/URI in the user's browser changing.
- nathe
Cirrocumulus
Sure. Then a rewrite should work. How come there are no pool members? A rewrite will still go to the same pool members assigned to the VIP.
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