Redirect Network Requests
Redirect Rule is used to redirect one URL to another URL. Simple right?
You can use this rule to map your production scripts or APIs to your local running code and test your local code directly on production sites without deployment. You can also set up a redirect rule to fix some broken rules, redirect the dead bookmarks to new working bookmarks and create URL shortcuts.
Common use cases:
- Test API version changes: Suppose there is a new version of some API which you are using. In order to test the backward compatibility of the API, you can just set up a redirect rule to redirect all URLs from older version to newer version and check if your application behaves as expected. This way, you don’t need to change single line of your code and test the API upgrades.
- Fix Broken Urls, Redirect dead bookmarks, and Create URL shortcuts: You can setup redirect rule to fix some broken rules, redirect the dead bookmarks to new working bookmarks and create URL shortcuts.
Check out this quick demo:
There can be many more examples like these but the above two examples give you an idea of where you can use the Redirect Rule.