Hi,
you can try with this irule:
when HTTP_REQUEST {
switch -glob -- [string tolower [HTTP::path]] {
"/api.dll" {
set objid [URI::query [HTTP::uri] objid]
HTTP::respond 301 Location "http://www.newsite.com/sharepoint.aspx?q=OBJECT%1A${objid}&v=look"
}
"/api.dll/[0-9][0-9][0-9][0-9]" {
set objid [URI::basename [HTTP::uri]]
HTTP::respond 301 Location "http://www.newsite.com/sharepoint.aspx?q=OBJECT%1A${objid}&v=look"
}
"/api.dll/*" {
set objid [URI::basename [HTTP::uri]]
HTTP::respond 301 Location "http://www.newsite.com/sharepoint.aspc?q=eLearning?v=look"
}
}
}