Dynamic Route Rewrite
The Dynamic Route Rewrite tool provides a runtime-based URL routing and rewriting functionality.
You can define flexible rules that control how incoming requests are processed and where they are directed. The routing logic can adapt to authentication state, environment (development, test, or production), or configuration context without requiring application-level changes.
Users access applications through clean and consistent URLs, while internal systems remain hidden behind a managed routing layer.
Routing rule conventions
Each routing rule defines how an incoming request is matched and where it is redirected. A rule consists of the following:
-
Incoming Path Pattern: the request pattern you want to intercept
-
Rewrite Path: the destination path to which the request should be rewritten
These elements operate together at runtime to provide controlled, configurable request handling.
Incoming Path Pattern
The Incoming Path Pattern specifies which URLs are matched. You can include parameters, wildcards, and optional segments to cover a wide range of path structures.
| Convention | Explanation | Before (incoming URL) | After (matched pattern) | Example use case |
|---|---|---|---|---|
|
Matches exactly one path segment. The value is stored as a named parameter. |
|
|
|
|
Matches one or more path segments, including slashes. |
|
|
|
|
Marks an optional path segment. The enclosed segment may appear or not. |
|
|
Rewrite Path
After a path is matched, the rewrite path determines the target destination. You can reuse captured parameters or wildcards and include fixed query strings.
| Convention | Explanation | Before (incoming URL) | After (rewritten URL) | Example use case |
|---|---|---|---|---|
|
Inserts parameter values captured from the incoming pattern. |
|
||
|
Inserts full path segments captured by a wildcard. |
|
||
Fixed query parameters |
Adds constant query parameters. Path variables cannot populate query values. |
|
Certain system-critical routes beginning with /api, /cockpit, or /launchpad
cannot be redefined. These paths are reserved to protect essential platform functions.
|
HTTP method scope
You can limit each routing rule to specific HTTP methods to control when it applies.
Select individual methods or choose ALL to include every type. This allows you
to separate routing for read and write operations, for example, when applying
rewrites only to GET requests while letting POST or PUT calls reach back-end
endpoints unchanged. Defining the method scope helps ensure routing rules trigger
only where operationally intended.
Routing modes
You can configure routing to operate in one of the following modes: Always Rewrite or Auth-based Rewrite.
Always Rewrite
In Always Rewrite mode, all matching requests are rewritten according to the
rule, regardless of user authentication. Use this mode for general restructuring
or rebranding of URLs, such as redirecting http://www.example.com/oldapp → http://www.example.com/NewApp.
Auth-based Rewrite
Auth-based Rewrite lets you define routing behavior that depends on user authentication. You can configure separate rewrite paths for authenticated and unauthenticated users.
For example:
-
If a user is not logged in and accesses
http://www.example.com/portal, you can redirect them tohttp://www.example.com/login. -
If a user is authenticated, you can route them to
http://www.example.com/home.
You can leave a rewrite path blank if no rewrite is needed for that condition. This mode ensures that users are routed to the correct destinations automatically, based on their access state.
Proxy and remote systems
You can optionally enable proxying to forward requests to another system instead of performing a local rewrite. When proxying is enabled, the routing layer passes the request to a back-end target while keeping the same visible domain. This allows you to direct traffic without exposing internal URLs.
You can select one of the following proxy options:
-
Remote System: Select a predefined back end configured in the Cockpit via the Remote Systems tool.
-
URL: Enter a full URL manually for the destination system.