Forum Discussion
marv_Williams_5
Nimbostratus
Sep 10, 2015Redirecting URI and Dynamic Content
I am struggling to get this to work. Here is the scenario:
https://mycompany.com/virtual.aspx?code=....&type=....
Redirect to:
https://egift.mycompany.com/egift.aspx?eid=.....&tid=.....
Stanislas_Piro2
Cumulonimbus
Sep 12, 2015Hi,
You can use this irule to help you:
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]] equals "mycompany.com") && ([HTTP::path] equals "/egift.aspx" ) } {
set eidval [URI::query [HTTP::uri] eid]
set tidval "b"
HTTP::respond 302 Location "https://egiftpp.mycompany.com[HTTP::path]?eid=$eidval&tid=$tidval"
}
}
As you can see, you can parse previous query to get parameters values and assign to parameters in redirect.
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