Forum Discussion
David_Barrett_2
Nimbostratus
Jan 04, 2006Hiding redirects
I have a question for writing an iRule on a 9.x
The application people would like the Big IP to take one URL and redirect to another URL or specify a URI under the first URL or redirect to a second URL altogether.
The trick is that the place we’re redirecting to must still “think” that the request is coming from the original URL and the users’ browser should still show the original URL
Example
Will need an 80 to 443 redirect…
http://training.company.com goes to https://training.company.com
and
https://training.company.com/sales needs to go to https://sales.company.com but still “think” its coming from https://training.company.com (some sort of hidden redirect?)
and/or
https://training.company.com/device1 needs to go to https://device.company.com but still “think” its coming from https://training.company.com
So, how do I maintain the original URL on the user’s browser while still redirecting to a new URL?
One more item to complicate things is that the Big IP houses the SSL cert for the training site.
Thanks for your time…
- unRuleY_95363Historic F5 AccountThis is actually what we term "rewriting" the url as opposed to "redirecting" it.
where $value represents the new value for the host. However, modifying the host maybe unnecessary as the BIG-IP is really choosing the host from a collection of pool members based on the load-balancing method. Usually, the Host header is used merely to record what host the original request was targeting. It's also used for virtual hosting so that the web server can sort out what host the request was targeted to. Since the BIG-IP is usually making this decision through the pool member selection you may not even need to change the Host header.HTTP::header "Host" $value
This will change the uri of the request to the one specified by $new_uri.HTTP::uri $new_uri
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