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 lose anything the user might have in the querystring.
Is there a way to tell the BigIP that it should tack on any querystring to the page I am redirecting the user to?
Here is my rule as it stands:
if (http_host == "partnertraining.host.com") {
redirect to "https://education.host.com/application/Custom_Login.asp"
}
This works fine, but I lose the querystring, if there was one.
Thanks in advance
bmonday
- Beau_Monday_107
Nimbostratus
Thanks for the help Colin. Yeah, I'm interested in passing along the querystring, if one exists. I tried your suggestion, but I am getting a syntax error: - Martin_MachacekHistoric F5 AccountYes, 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" }
http://partnertraining.host.com/login.asp
https://education.host.com/application/login.asp
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