Use the URL Rewriter
Info: The URL Rewriter feature in Bloomreach Content requires a standard or premium license. Contact Bloomreach for licensing details.
Overview
The URL Rewriter adds a dedicated section to the Content application in the CMS. This section appears in areas such as Documents and Images. When you select a folder in the navigation tree, you see an overview of the URL rewrite rules defined for that folder. The overview displays details including the source path (from), destination path (to), and the redirect type. Conditions attached to rules are not shown in this overview.
Rules are processed in the order they appear. When you define multiple rules with overlapping paths, place more specific rules before general ones. For example, a rule for /abc/def should come before a rule for /abc.
To review all configured rules, their conditions, and their processing order, use the status page available at /rewrite-status on your local environment. Refer to the relevant configuration in the site module's web.xml file for further details.
Configuration
Global configuration for the URL Rewriter is stored in the module configuration at:
/hippo:configuration/hippo:modules/urlrewriter/hippo:moduleconfig
You can set the following properties using the Hippo Console:
| Property | Description | Default |
|---|---|---|
| urlrewriter:ignorecontextpath | If set to false, all URLs to match must be prefixed with the context path. Use this if your URLs include the context path. | true |
| urlrewriter:usequerystring | If true, the query string is included when matching URLs. | false |
| urlrewriter:skippedprefixes | List of path prefixes to exclude from rewriting. | {/_cmsinternal, /_cmsrest, /_cmssessioncontext, /_rp, /hn:, /ping/} |
| urlrewriter:skippost | If true, POST requests are not rewritten. | true |
| urlrewriter:disallowedduplicateheaders | List of response headers for which duplicate values are filtered out. For example, Access-Control-Allow-Origin must not have multiple values. | Access-Control-Allow-Origin |
Adding Rules
When you create a new URL rewrite rule, you can choose from three types:
| Rule Type | Description |
|---|---|
| Rule | A standard rule suitable for common rewrite scenarios. |
| Advanced Rule | Supports conditional rewrites and uses regular expressions. Use this for complex requirements. |
| XML Rule | Allows you to define rules in XML format, compatible with Paul Tuckey's Url Rewrite Filter. |