URL Migration problem
I currently have two websites that I publish....
website.acme.com
website2.acme.com
For each published website I have irules in place which reference a datagroup list which contain certain url redirects.
For example:
If a user enters http://website.acme.com/test/123.htm in their browser, F5 takes that request, references the datagroup and forwards it to http://website.acme.com/test2/test2.htm
-or- If a user enters http://website2.acme.com/test/123.htm in their browser, F5 takes that request, references the datagroup and forwards it to http://website2.acme.com/test2/test2.htm
This all works because they reference two different pool and nodes, they reference different irules and data classes, etc...
One of my developers would now like to have certain requests (not all) coming in for http://website.acme.com to be directed to website2's backend pool member and keep "website.acme.com" in the url. (for selected paths)
Here is my current irule:
when HTTP_REQUEST {
set reqPath [string tolower [HTTP::path]]
if { [class match $reqPath eq website.acme.com_class] } {
set redirect_url [class lookup $reqPath website.acme.com_class]
HTTP::respond 302 Location $redirect_url Connection "Close"
}
}
I need to figure out a way that if a request comes in for http://website.acme.com/test/abc, redirect it to the website2.acme.com pool with the /abc path, but don't change original url path.
So it looks like: http://website.acme.com/test/abc/default.htm
Any assistance would be greatly appreciated.