Create dynamic route rewrite rule

Use this procedure to create a custom dynamic routing rule that defines how incoming requests are matched, rewritten, and optionally proxied to target systems at runtime.

Prerequisites

  • If you want to forward requests to another (remote) system instead of performing a local rewrite, then you have created and configured a remote system in the Remote Systems tool.

Procedure

  1. In the Cockpit, select the Dynamic Route Rewrite tool.

    Result: A list of defined dynamic route rewrite rules display.

  2. Select Create Rule.

    Result: The Create Rule dialog opens.

  3. In Name, enter a meaningful name for your dynamic rewrite rule and in Package, assign a development package to your dynamic rewrite rule.

  4. Select Create.

    Result: The General tab for the created dynamic rewrite rule opens.

  5. In Description, enter a meaningful description for the rule.

  6. To enable the rule, turn on the Active switch.

  7. In HTTP Methods, select the HTTP methods to which the dynamic rewrite rule applies.

  8. In Incoming Path Pattern, enter the incoming path pattern following the pattern that corresponds to your use case.

  9. In Mode, select either Always Rewrite or Auth-based Rewrite to define if the route rewrite for the rule changes or not on the basis of user authentication.

    1. If you select Always Rewrite, enter the desired rewrite path following the pattern that corresponds to your use case.

    2. If you select Auth-based Rewrite, also follow the pattern that corresponds to your use case, but account for differences in user authentication in If authenticated → Rewrite to and If authenticated → Rewrite to.

  10. To enable proxying to forward requests to another system instead of performing a local rewrite, turn on the Enable Proxying switch.

    1. In Remote System, select a predefined remote system to forward requests to from the selection list.

    2. Alternatively, you can manually enter a full URL for the destination system for proxy.

  11. Select Save.

Results

  • You have created and configured a dynamic routing rule that rewrites incoming URLs at runtime based on the HTTP methods, path patterns, authentication state, and proxy settings defined for your use case.