Getting Started
Getting Started
Installation
Installation
HTTP Rules (Modify Traffic)
HTTP Rules (Modify Traffic)
Overview
Redirect URL (Map Local, Map Remote)
Replace Strings (Switch Hosts, API Endpoints)
Modify Headers
Modify Request Body
Modify Response Body
Modify Query Params
Modify Cookies
Modify DOM/Inject scripts
Modify User Agents
Delay Request
Cancel Rule
Organizing Rule
Import/Export Rules from File
Pause/Resume Requestly
Rule Operators
Advance Targeting
Sharing Rules
Map Local
Map Remote
Pinning Rules
GraphQL Support
Edit and Replay
Import Setting from Charles Proxy
Test URL Condition
Test this Rule
File Server
File Server
Sessions Replay
Sessions Replay
Getting Started
Getting Started
Installation
Installation
HTTP Rules (Modify Traffic)
HTTP Rules (Modify Traffic)
Overview
Redirect URL (Map Local, Map Remote)
Replace Strings (Switch Hosts, API Endpoints)
Modify Headers
Modify Request Body
Modify Response Body
Modify Query Params
Modify Cookies
Modify DOM/Inject scripts
Modify User Agents
Delay Request
Cancel Rule
Organizing Rule
Import/Export Rules from File
Pause/Resume Requestly
Rule Operators
Advance Targeting
Sharing Rules
Map Local
Map Remote
Pinning Rules
GraphQL Support
Edit and Replay
Import Setting from Charles Proxy
Test URL Condition
Test this Rule
File Server
File Server
Â
Map Remote
The Map Remote feature lets you change the request's location to a new destination location such that the response is transparently served from the new location as if it was the original request.
How to use
You can use Redirect/Replace rule to set up mappings.
- Redirect rule allows you to redirect network requests from one URL to another.
- Replace rule allows you to replace a part of the URL with another string.
You can check out the demo here:

Matching Requests
All the Requestly rules can match requests based on the URL, host, path, and rule operators. With the help of these operators, you can define rules to match using the wildcard, regex, or string matching types. You can also perform advanced targeting on the requests.
You can perform regex pattern matching in replace rule to extract information from the URL:
For example: Extract domain, pathName and extension for URLs ending withÂ
.jpg
/(https:\/\/[^\/]*)(.+)(\.jpg)$/i
- $1 is the value of 1st group expression. – DomainName
- $2 is the value of the 2nd group expression – PathName but not the file extension
- $3 is the value of the 3rd group expression – File extensionÂ
.jpg
 in this case
Similar Examples
Map local resources on the production site
Â
You can find the above redirect rule here.
Switch domain to staging environment using replace rule
You can find the above replace the rule here.
Popular Use Cases
- Use development/staging endpoints on your production sites without changing the code so that you can directly test your local code on production sites without deployment.
- You can switch your domain to a local environment for testing new changes that are yet to be deployed.
- You can map HTTP requests to an HTTPS destination and vice versa.
- You can test the backward compatibility of a new API by mapping all requests to the more recent version of the API.
Â