Forum Discussion
elvisc_26948
Nimbostratus
Jan 06, 2010redirect/return a diff url without client action
Is there a way to return/redirect a different URI back to client but without aborting the session i.e no client action required.
eg:
http:xyz.com/URI_1
http reque...
elvisc_26948
Nimbostratus
Jan 06, 2010thanks for the quick response... I have tried a few other methods including yours before... which basically replace the uri from LB to the server side.
What I really want to achieve is:
eg the sequence of requests looks like this:
http://xyz.com/URI_1
http://xyz.com/URI_2
"
"
http://xyz.com/URI_X
http://xyz.com/index
http://xyz.com/URI_1
"
"
http://xyz.com/URI_X
http://xyz.com/index
"
"
I want to always capture at the point where index request comes in first before I read
the URIs.
---------------------------------------------------
Currently I am trying to do it using this technique:
when RULE_INIT {
global var so all subsequent sessions can check if index is requested first
set ::INDEX_READ "TRUE"
log local0. "RULE INIT ==> $::INDEX_READ"
}
when HTTP_REQUEST {
if (http::uri is index) and (INDEX_READ is FALSE) {
do something URI manipulation
set ::INDEX_READ "FALSE"
}
if (INDEX_READ is FALSE) {
if { [HTTP::uri] eq "/URL_1" } {
do something other string manipulation
HTTP::uri /prefix[HTTP::uri]
}
}
}
Trying that now and will let you know how it goes...
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