Setup API request rewriting with both routes and regex approaches.