Forum Discussion
marv_Williams_5
Sep 10, 2015Nimbostratus
Redirecting 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
Sep 12, 2015Cumulonimbus
Hi,
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.
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