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
-
In the Cockpit, select the Dynamic Route Rewrite tool.
Result: A list of defined dynamic route rewrite rules display.
-
Select Create Rule.
Result: The Create Rule dialog opens.
-
In Name, enter a meaningful name for your dynamic rewrite rule and in Package, assign a development package to your dynamic rewrite rule.
-
Select Create.
Result: The General tab for the created dynamic rewrite rule opens.
-
In Description, enter a meaningful description for the rule.
-
To enable the rule, turn on the Active switch.
-
In HTTP Methods, select the HTTP methods to which the dynamic rewrite rule applies.
-
In Incoming Path Pattern, enter the incoming path pattern following the pattern that corresponds to your use case.
-
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.
-
If you select Always Rewrite, enter the desired rewrite path following the pattern that corresponds to your use case.
-
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.
-
-
To enable proxying to forward requests to another system instead of performing a local rewrite, turn on the Enable Proxying switch.
-
In Remote System, select a predefined remote system to forward requests to from the selection list.
-
Alternatively, you can manually enter a full URL for the destination system for proxy.
-
-
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.