Forum Discussion
EJL_104429
Nimbostratus
Nov 30, 2007Complicated Redirect for Peoplesot
Hello,
I'm having trouble wrapping my head around how to do the following:
Users will be requesting http://peoplesoft
And need to be redirected to one of the two servers, each service has a different URI, and port:
https://psprdweb01.acme.com:9601/psp/HRPRD1/?cmd=login
https://psprdweb01.acme.com:9602/psp/HRPRD2/?cmd=login
https://psprdweb02.acme.com:9603/psp/HRPRD3/?cmd=login
https://psprdweb02.acme.com:9604/psp/HRPRD4/?cmd=login
This does not work, but is the right idea:
when LB_SELECTED {
if { [HTTP::uri] equals "/" } {
switch [LB::server port] {
9601 { HTTP::redirect
"https://psprdweb01.acme.com:9601/psp/HRPRD1/?cmd=login" }
9602 { HTTP::redirect
"https://psprdweb01.acme.com:9602/psp/HRPRD2/?cmd=login" }
9603 { HTTP::redirect
"https://psprdweb02.acme.com:9603/psp/HRPRD3/?cmd=login"}
9604 { HTTP::redirect
"https://psprdweb02.acme.com:9604/psp/HRPRD4/?cmd=login"}
}
}
}
Any help would be great...
- hoolio
Cirrostratus
When you say it doesn't work, what do you mean? What does the client see in the browser? Do you see any errors in the /var/log/ltm log file? - EJL_104429
Nimbostratus
You can't use HTTP::redirect with LB_SELECTED - hoolio
Cirrostratus
It looks like the wiki page for HTTP::redirect is correct then, that HTTP::redirect isn't allowed in the LB_SELECTED event. I got an invalid action error when trying it:when LB_SELECTED { if { [HTTP::uri] equals "/" } { switch [LB::server port] { 80 { clientside {HTTP::redirect "https://psprdweb01.acme.com:9601/psp/HRPRD1/?cmd=login"} HTTP::redirect "https://psprdweb01.acme.com:9601/psp/HRPRD1/?cmd=login" } } } }
when HTTP_REQUEST_SEND { if { [clientside {HTTP::uri}] equals "/" } { switch [LB::server port] { 80 { clientside {HTTP::redirect "https://psprdweb01.acme.com:9601/psp/HRPRD1/?cmd=login"} } } } }
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