I would recommend using datagroup with "class match" instead of "matchclass" as this has been deprecated with the 10.x code version and later.
Try this:
when HTTP_REQUEST {
log local0. "Request: [HTTP::host][HTTP::uri]"
if {[HTTP::host] equals "website1.com"} {
if { ([HTTP::uri] contains "app/commission") or ([HTTP::uri] contains "api/tickets") or ([HTTP::uri] contains "api/manageclasses") or ([HTTP::uri] contains "app/trainer") or ([HTTP::uri] contains "app/target") } {
HTTP::respond 301 Location "http://www.website2.com/"
}
}
}