Forum Discussion
Beau_Monday_107
Nimbostratus
Sep 29, 2005redirect to a specific page, but keep the Querystring?
Hi,
I have a client that wants to direct users arriving via a specific host to a special login page. This is fine, I have this working. However, because I redirect to a specific URI, I los...
Martin_Machacek
Sep 30, 2005Historic F5 Account
Yes, the syntax is different in 4.2, the string composition using '+' is not available. In version 4.2 you can use the %u expansion in the redirect string to get the original URI, but there is no way to get just the query variables. It means that the server needs to accept the extra component in the URI. Your rule may look like this:
if (http_host == "partnertraining.host.com") {
redirect to "https://education.host.com/application/%u"
}
Please, refer to section "Using format strings (expansion characters)"
of the BIG-IP Reference Guide for details (http://tech.f5.com/home/bigip/manuals/bigip4_5_10/bigip4_5_10ref/BIGip_pools.html1184371).
So, if for example the original request is:
http://partnertraining.host.com/login.aspThe redirect will be to:
https://education.host.com/application/login.aspYou'll need to use URL rewritting of some sort (for example mod_rewrite in Apache) at the target server to do the rest. You can always upgrade to a more up to date version of BIG-IP and use string parsing and composition to construct the redirect to URL :-).
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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