BigIP_Support_9
Feb 23, 2006Nimbostratus
Change URI without redirect
I want to change the user URI as below:
http://www.abc.com/demo -> http://www.abc.com/demo1
Here is my code:
if (http_uri == "/demo") {
redirect to "http://" + http_host + "/demo1/"
}
else {
if (http_uri matches_regex "/demo/") {
redirect to "http://" + http_host + "/demo1/" + substr(http_uri, 6, 1000)
}
else {
use pool demo-pool
}
}
It works but it requires too many redirect. Clients are required to use new conenction after redirect according
to RFC 2616.
In fact I just want to change demo to demo1. Can I change the URI and forward to demo-pool pool within a single "if" clause? I don't want to redirect and client go back again and falls to the last "if" clause.