Joe_Pipitone
Feb 03, 2010Nimbostratus
Rewrite / redirect from /admin
I am trying to redirect and rewrite all requests to a directory, as well as any arguments that are passed through the request.
For example:
http://ourwebsite.org/admin/leads.asp?id=234&pid=193
should rewrite to:
http://legacy.ourwebsite.org//admin/leads.asp?id=234&pid=193
The following iRule below does not work - any ideas why?
when HTTP_REQUEST {
if { ([HTTP::uri] eq "/admin*") } {
switch -glob [HTTP::uri] {
"/" { HTTP::redirect "http://legacy.ourwebsite.org" }
default { HTTP::redirect "http://legacy.ourwebsite.org[HTTP::uri]" }
}
}
}