Skip to main content
Skip table of contents

URL Rewriting

The URL Rewriting Policy is used to re-write responses from the backend API such as they will be modified by fixing up any incorrect URLs found with modified ones. As the API Management works through an API gateway, in some cases an API might return URLs to followup action or data endpoints. In these cases the backend API will likely be configured to return a URL pointing to the unmanaged API endpoint. This policy can fix up those URL references so that they point to the managed API endpoint instead.

This policy cannot be used for any other replacements besides URLs. The policy is implemented specifically to find and replace valid URLs.

Configuration Options

OptionTypeDescriptionPossible ValuesDefault

Find all URLs matching regular expression
(fromRegex)

StringA regular expression used to identify a matching URL found in the response.--
ReplacementStringThe replacement URL. Regular expression groups identified in fromRegex can be used.--
Request URLBooleanSet to true if URLs should be replaced in the request body.true / falsefalse
Request HTTP headersBooleanSet to true if URLs should be replaced in the request headers.true / falsefalse
Response HTTP headersBooleanSet to true if URLs should be replaced in the response headers.true / falsefalse
Response HTTP bodyBooleanSet to true if URLs should be replaced in the response body.true / falsefalse
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.