Forum Discussion
URL redirect but maintain original URL in browser
Brilliant minds out there.. I need help
I working on an issue to redirect the https://familytest.test.org. I'm redirecting to https://cfitest-help.test.org. How can I do this and maintain the original URL https://familytest.test.org in the client browser? Does anyone have an iRule?
Thank you in advance for you help on this
6 Replies
Hi Reginald
Yes, you could.
Is "cfitest-help.test.org" behind the load balancer? Otherwise you'd have to add a pool with the public ip of "cfitest-help.test.org" and add source NAT (not really recommended though since you'd potentially be bouncing malicious traffic on to that site from your IP addresses).
On to the solution. Just replace the host header on incoming requests and you should be good to go:
when HTTP_REQUEST { HTTP::header replace Host "cfitest-help.test.org" }/Patrik
I might also add, that this would not technically be a redirect but a rewrite, as a redirect per definition changes the browser address bar.
/Patrik
- Vernon_97235Historic F5 Account
I also encourage you to read through this iRules recipe:
Good stuff Vernon!
- VernonWells
Employee
I also encourage you to read through this iRules recipe:
Good stuff Vernon!
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