Skip to content
Easy Redirects

Installation Guide

Get Easy Redirects up and running in your Magnolia DXP instance.

Back to Easy Redirects

Prerequisites

  • Magnolia DXP 6.4 or higher
  • Java 17 or higher
  • Maven 3.9 or higher

1. Add Maven Dependency

Add the following dependency to your Magnolia bundle's pom.xml:

<dependency>
    <groupId>work.noice</groupId>
    <artifactId>easyredirects</artifactId>
    <version>2.0.0</version>
</dependency>

2. Start Magnolia

Start (or restart) Magnolia. The module will be automatically installed and registered. You can then access the Redirects app from the Magnolia AdminCentral.

3. Configuration (Optional)

The module works out of the box with sensible defaults. Redirects are stored in the redirects workspace.

Virtual URI Mapping

The module automatically registers URI mappings in the following order:

  1. /modules/easyredirects/virtualUriMappings/default — Standard redirects
  2. /modules/easyredirects/virtualUriMappings/spa — SPA/headless redirects with JSON response support
  3. /modules/easyredirects/virtualUriMappings/headless — Headless-specific redirects

Public URL Service Configuration

Configure the public URL service in your site definition:

/modules/multisite/config/sites/[your-site]:
  publicUrlService:
    class: work.noice.easyredirects.service.EasyRedirectsPublicUrlService

New in Version 2.0

  • SPA redirect support — Return redirect information as JSON for client-side routing
  • Improved caching — Enhanced redirect caching for better performance
  • Bulk operations UI — Select and modify multiple redirects at once
  • Analytics integration — Track redirect usage with built-in hit counters

Creating Redirects

  1. Open the Redirects app in Magnolia AdminCentral
  2. Click Add redirect
  3. Fill in the required fields:
    • Source URL: The URL pattern to redirect from (supports wildcards)
    • Target URL: The destination URL
    • Type: Choose between 301 (permanent) or 302 (temporary)
    • Site: Select target site (optional, defaults to all sites)
    • Active: Enable/disable the redirect

Pattern Matching

Easy Redirects supports advanced pattern matching:

Wildcard Patterns

/old-products/*  →  /products/*
/blog/*/comments  →  /blog/*/discussion

Regex Patterns

/product-(\d+)  →  /products/$1
/category/(.*)/page-(\d+)  →  /categories/$1?page=$2

Exclusion Patterns

Define patterns to exclude from redirect processing:

.*/\.resources/.*  — Exclude resource URLs
.*\.(jpg|png|gif|css|js)$  — Exclude static assets

Building from Source

git clone https://github.com/noicework/easyredirects.git
cd easyredirects
git checkout main
mvn clean install

Next Steps

Once installed, access the Redirects app from the Magnolia AdminCentral. Use the Preview action to test redirects before publishing, complete with QR code generation for mobile testing.