Use the URL Rewriter - BloomReach Experience - Open Source CMS

This article covers a Hippo CMS version 12. There's an updated version available that covers our most recent release.

07-07-2017

Use the URL Rewriter

This feature is available since Hippo CMS 12.0.0
This Bloomreach Experience Manager feature requires a standard or premium license. Please contact BloomReach for more information.

Overview

In the CMS' Content perspective, URL Rewriter adds an extra section (to Documents, Images etc.). Clicking on a folder in the lefthand-side navigation tree reveals an overview of the rules in that folder, with some extra information like the from, to and type of redirect. Note that this does not display the conditions, if there are any. The rules are processed in the order they appear, so keep this in mind when creating rules of different depth. For example, the rule rewriting /abc should come after the rule rewriting /abc/def.

Which rules and conditions have been configured and in what order they will be processed can be seen on the status page, which is accessible locally at /rewrite-status. See also the corresponding configuration in the site module's web.xml.

Configuration

The global configuration of URL Rewriter is stored as module configuration, on

/hippo:configuration/hippo:modules/urlrewriter/hippo:moduleconfig

 The following properties can be set, through the Hippo Console:

Property Explanation default
urlrewriter:ignorecontextpath setting this to false will require you to prefix all the URLs you want to match with the contextpath, use this if you don't strip the context path from your URLs true
urlrewriter:usequerystring when set to true, the query string is taken into account when matching URLs false
urlrewriter:skippedprefixes this is a multiple string, each value is a prefix that should not be rewritten {/_cmsinternal, /_cmsrest, /_rp, /hn:, /ping/}
urlrewriter:skippost when set to true, POST requests will not be rewritten true

Adding Rules

When creating a new rule, there are three options:

Rule Type Explanation
Rule This type is the most simple to use, and should cover all the common use cases
Advanced Rule This type supports conditional rewrites and is regular expression based. It should be able to cover almost any use case.
XML Rule Here you can add XML Rules in the format supported by the underlying software, Paul Tuckey's Url Rewrite Filter
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?