APM - irules (for redirects)

We are trying to implement a new solution for our internal/external web portal through APM. We currently have the following -

user --- (is user from the US) ---- (check user ip subnet) ----- (http 401 response) ----- (kerberos check) ---- allow

----- if user is external --- (login page) ----- (SSO) ----- allow

the issue we are running into is that we dont want any of the F5 default error pages.. we want all 401, 403 and 404s to go to pages published on our web servers..

would the best place for this be in the beginning before the check for user geography?

Any ideas?

Could you use an iRule with the HTTP::respond command perhaps?