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.

  1. Create a matching condition that uses the "When all these conditions are met any number of times" pattern.

  2. Match by a URL that uses a string value to match the desired URL. For example: example.com.

  3. 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.

Creating "Map Remote (localhost)" rule

Once the rule is created, enable the Rules tab, toggle the rule switch, and start capturing traffic.

Activating the "Map Remote (localhost)" rule

Download a ready-to-use "Map Remote (localhost)" rule as a FARX file, which you can import through the Rules toolbar.

See Also