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,...
hoolio
Cirrostratus
Nov 30, 2007It 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:
011f0007:3: http_process_state_prepend - Invalid action EV_SINK_HEADER during ST_HTTP_PREPEND_HEADERS
I'm not sure why this happens as I didn't think a serverside connection had been established in LB_SELECTED.
I tried this:
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"
}
}
}
} And this:
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"}
}
}
}
} ...but still get the error. I have a faint memory of running into this problem a while back, but can't remember if there was a solution.
Does anyone else have ideas on how you can send a redirect back to the client based on the load balancing decision made in LB_SELECTED?
By the way, do you actually have virtual servers set up for each of the four host names/port combinations? As an alternative, could you keep the client requesting the same external hostname, but rewrite the host header based before the request is send to the node? You'd probably also need to rewrite the Location header in HTTP redirects as well as any absolute references to the four hostnames in the HTTP content.
Aaron
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