Redirect all path of front-end to a default page in backend server

I want to redirect all path not in the acl to the default login page in the backend server

frontend 123
acl to1 url_beg /api
acl to2 url beg /login
acl to3 url beg /logout
use_backend backend if to1
use_backend backend if to2
use_backend backend if to3

I want all request to the website not in the acl like www.abc.com/123, www.abc.com/xyz will default backend server like www.abc.com/login.jsp and remove all path /123 or /xyz

I try default_backend but it will add the path /123 or /xyz to the backend server

Thanks!

Use http-request set-pathq / if !to1 !to2 !to3 to set the request path to “/” for all requests except those covered by the acl-s.

(http-request set-pathq documentation).