Yes, This is very much possible using Requestly Replace Rule. Here's the steps to setup Replace Rule
- Create New Rule
- Select Replace Rule (Blue Color)
- Replace
www.domain1.com With www.domain2.com
- Save Rule
Here's the screenshot of the rule

We have documentation on Replace Rule as well. Check this out. Here's an excerpt from the doc
Switch Domains
Situation: Suppose you are working on a web app which fetches content from your REST API available at http://my-app-server.com/rules. You have cloned the API server, made some changes and running it locally on http://localhost:4000/rules. Now, you want to test your app with the new changes done on API server.
Approach1: Change the domain in your App code to hit localhost instead of my-app-server. Once your testing is done revert this change.
Approach2: Use Replace Rule Define a Replace Rule to replace http://my-app-server.comwith http://localhost:4000 in all URLs. No need to change url inside your code. After your testing, just disable the rule.