Forum Discussion
Adrian_Turcu_10
Nimbostratus
Oct 30, 2007Help With HTTP_RESPONSE
Hello Gurus
Could someone help me with a quick rule to replace a header in the response back to the client, please?
My problem is like follows: we have a poxi app (not proxy) and the damn thing is sending a redirection back to the client to localhost instead of maintaining the hostname that requested the initial page and the protocol
I was talking with the developers and they they don't have an estimate for a fix (I'm gonna kill them soon) and reading through the posts I believe my interim solution will be arounf HTTP_RESPONSE actions in the iRules.
How can I use iRules in the response to the client to replace the beging of the redirection (http://127.0.0.1) with the protocol and host that was made for that request (https://acme.com) and maintain the reamining of the redirectied URI (/some/redirected/path/to/the/client.jsp)
Thanks in advance,
Adrian
- Patrick_Chang_7Historic F5 AccountIs the host that made the request (https://acme.com) a fixed value or is it something that changes and must be read from the request?
- Adrian_Turcu_10
Nimbostratus
That should be read from the request as it can change in protocol, i.e HTTPS vs. HTTP - David_Homoney
Nimbostratus
when HTTP_REQUEST { - Adrian_Turcu_10
Nimbostratus
Nice and slick, thanks. - David_Homoney
Nimbostratus
Adrian, - Adrian_Turcu_10
Nimbostratus
They are standard ports for HTTP and HTTPS. - David_Homoney
Nimbostratus
when HTTP_REQUEST { - Adrian_Turcu_10
Nimbostratus
hmmm... i don't really think so... maybe I did not say it right in the first place. sorry... - David_Homoney
Nimbostratus
Ok I understand now. Sorry for the confusion. You are correct in the stripping of the location header and pulling out the URI. Unfortunately this is the way you will have to do it. - Adrian_Turcu_10
Nimbostratus
That Location header will be in this form (I got a header sniff on the replies)
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects