Forum Discussion
Sep 29, 2009
12031 error
Hello all,
I am getting a 12031 error on accessing static files on a proxy server that needs credentials. It's suppose to prompt the user for credentials, but it doesn't.
...
Sep 30, 2009
Sorry I should be been more specific. I want to keep the global_URL to be a 1 (the same) for all subsequent requests on the same TCP connection.
The logic is this (read comments):
set global_URL 0 set global variable to 0
if { ([HTTP::uri] contains "/solutioncenter") } {
set global variable flag for any old solutioncenter URL
set global_URL 1 if the initial request URI is an old URL then do a 301 re-direct to our new homepage URL which is "http://www.qad.com/erp/x+y ...."
HTTP::respond 301 Location [string map {"/solutioncenter" "/erp"} "[HTTP::uri]"]
return
} elseif { ([HTTP::uri] contains "+") or ([HTTP::uri] contains "action.process") or ([HTTP::host] equals "outside.qad.com") } { else URI contains a "+" characther then return
return
... when it is redirected in the 1st if statement to "http://www.qad.com/erp/x+y ...." then it will hit the second elseif
because of the "+" sign in the URI, but by now, the global_URL will be set to 0 due to the global variable set at the
begginging of HTTP_Request.
.. The reason why I want the global_URL to be 1 is because I do a check at the bottom of HTTP_RESPONSE. IF the global_URL is NOT 1, then it will never execute the else if.
when HTTP_RESPONSE {
if { ([HTTP::status] starts_with "3") } {
set newRedir [string map {"/portal/site" "" } [HTTP::header Location]]
HTTP::header replace Location $newRedir
log local0. "301 re-direct Header: $newRedir"
return
} elseif { ([HTTP::status] contains "404") and ($global_URL == 1) } {
HTTP::respond 301 Location "http:[HTTP::host]/erp/"
log local0. "404 error re-direct to erp homepage from solutioncenter"
return
}
}
I hope that clarified my issue.
Thank you.
Regards,
TRX
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
