Forum Discussion
tran_93981
Nimbostratus
Oct 11, 2015proxy to specific node with specific url
Hello,
I am trying to write iRule to accomplish this
Here is what I am trying to do
http://publicserver.com/engineering/las ---> internalserver.com:9290/las
http://publicserver.com/en...
tran_93981
Nimbostratus
Oct 23, 2015Hello,
Sorry it took long to post this. I had not have a chance to try it until yesterday. I tried your suggestion but unfortunately, it does not solve problem. So the irule is written like this
when HTTP_REQUEST {
log local0. "[HTTP::uri] ****"
if {([HTTP::uri] starts_with "/engineering/las")} {
log local0. "redirecting to /las"
HTTP::uri "/las/"
} elseif {([HTTP::uri] starts_with "/engineering/thredds")} {
log local0. "redirecting to /thredds"
HTTP::uri "/thredds/"
} else {
log local0. "using pool yaquina-only"
pool yaquina-only
}
}
What I am experiencing with this re-written irule is: the "else" statement works but the "if" and "elseif" do not work. When a user tries to get to http://publicserver.com/engineering/las, the page displays saying "not found". I believe it is because the "if" changes the uri and the requests becomes http://publicserver.com/las then that request matches the "else" statement.
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