Set Redirect Action

Last Updated: Feb 28, 2022
documentation for the dotCMS Content Management System

Shown below is an example of the “Redirect Requests” Action that sets a redirects the visitor to another site/URL, based on custom Ruleset Conditions:

Set Redirect Requests Actionlet

For the Redirect Action to take place, the Condition Group must evaluate to be true, the Rule must be set to “ON“, a “Fire On” property must be set, the “Redirect request to” Action must be selected, and a valid URL value set.

The “Fire On” Rule property can be set to:

  • Every Page
  • Once per Visit
  • Once per Visitor
  • Every Request (must be used for File or image asset paths)

Rewrites / Pattern Matching

Redirect Rules accept wildcard matchers and can be used to perform url-rewrite like redirects. For example, to redirect all traffic from a site to a CDN could look something like this.

/(.*). ---> https://cdn.demo.dotcms.com/$1

On this page

×

We Dig Feedback

Selected excerpt:

×