Forum Discussion
sudarshan_cheru
Altostratus
Jun 06, 2016irule to use redirection to another url with login credentials generated from the header
My requirement is to redirect the url to other url with copied credential part generated in the browser header too.
when user hits
https://www.abc.com/acspl/cgsContribInit?AI=9d8278d298e24f1fb9477b6...
Yann_Desmarest
Cirrus
Jun 06, 2016Hi,
try to use the following as example :
when HTTP_REQUEST {
if { [HTTP::header Host] eq "www.abc.com" and [HTTP::path] contains "/acspl/cgsContribInit" and [HTTP::query] contains "AI=" and [HTTP::query] contains "ccsource=" } {
HTTP::respond 302 noserver "Location" "https://www.123.com/prgw/dpcs/myfriend/mlgLandingPage?uuid=[URI::query [HTTP::uri] AI]&ccsource=[URI::query [HTTP::uri] ccsource]" Cache-Control" "no-cache, must-revalidate"
}
}
- sudarshan_cheruDec 20, 2016
Altostratus
HI Yann, i am very sorry to give you late reply. coming to the point using your irule i am not able to get the credentials path. Rest part i am getting redirected. in the last it showing only uuid=&ccsource=
- Yann_DesmarestDec 20, 2016
Cirrus
Hi,
I just updated the source code example.
The URI was missing in the command to query specific parameters :
[URI::query [HTTP::uri] AI]
Now, it should works fine
BR
Yann
- sudarshan_cheruDec 21, 2016
Altostratus
Fantastic Yann. It worked . Thanks alot for quick help. Merry Christmas and happy new year.
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