Map Localhost Sources
Remote mapping of a request location means testing changes or fixes locally and avoiding deploying on an actual remote host. However, testing against a localhost environment is often the more straightforward, quicker, and cheaper solution. By mapping the destination to localhost, you can test partial or complete solutions.
With Fiddler Everywhere, you can easily create a rule that redirects or maps traffic to and from localhost addresses.
Creating a "Map Remote (localhost)" Rule
Create a "Map Remote (localhost)" rule by setting the following actions through the Rules Builder.
Create a matching condition that uses the "When all these conditions are met any number of times" pattern.
Match by a URL that uses a string value to match the desired URL. For example: example.com.
Create an Update URL action and set the desired new target localhost path. For example, you can use a regular expression that replaces only the request's host while preserving the path.
This sample Fiddler rule matches requests made to https://example.com/my-test-api and maps them to http://localhost:4000/my-test-api.
Once the rule is created, enable the Rules tab, toggle the rule switch, and start capturing traffic.
Download a ready-to-use "Map Remote (localhost)" rule as a FARX file, which you can import through the Rules toolbar.
See Also
- Learn more about the Rules functionality in Fiddler Everywhere here...
- Learn more about all rules presets in Fiddler Everywhere here...
- Learn more on how to organize your rules here...
- Learn more about the matching conditions here...
- Learn more about the supported actions here...
- Learn more about final and non-final rules here...
- Learn more about using breakpoints here...