How can I redirect all outgoing traffic from a Tomcat server by Url patterns?
Example: redirect all requests from tomcat to
- http://my.backend.url:8080/my-service redirect to http://a.backend.url:8080/my-service-a
- and http://my.backend.url:8080/my-service2 redirect to http://b.backend.url:8080/my-service-b
It is only for development purpose on a windows machine. I don't want to modify my host-file because I still want to access everything as-is in my browser.
Is there a way to config tomcat like this?
Edit: clarification:
currently all the services run on one backendserver, but i want to deploy them on different servers. so based on the url-part after the / i want to route it to a different server.
i.e. :
- /service1 -> server1/service
- and /service2 -> server2/service