thelia/rewrite-url-module

Maintainers

Package info

github.com/thelia-modules/RewriteUrl

Type:thelia-module

pkg:composer/thelia/rewrite-url-module

Transparency log

Statistics

Installs: 16 983

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 3

2.2.6 2026-08-04 07:54 UTC

README

This module allows you to create general redirection rules for your website. You can also manage rewritten urls for products, categories, folders, contents, brands.

  • Allows you to redirect a url to another based on a regular expression or matching GET parameters
  • Allows you to reassign a url to another (product, category, folder, content, brand)
  • Allows you to reassign all urls to another (product, category, folder, content, brand)
  • Allows you to reassign a default url to your (product, category, folder, content, brand)
  • Allows you to display the list of not rewriten urls (product, category, folder, content, brand)

Scrutinizer Code Quality License Latest Stable Version

See the changelog

Compatibility

Thelia > 2.1

Installation

Manually

  • Copy the module into <thelia_root>/local/modules/ directory and be sure that the name of the module is RewriteUrl.
  • Activate it in your thelia administration panel

Composer

Add it in your main thelia composer.json file

composer require thelia/rewrite-url-module:~1.5.8

Usage

BackOffice :

  • in Product edit tab modules
  • in Folder edit tab modules
  • in Content edit tab modules
  • in Brand edit tab modules
  • in Category edit tab modules
  • in Configuration list not rewriten urls
  • in the module configuration page

Import of redirections and gone URLs

CSV file with three columns: URL, REDIRECT, GONE. Fill in either REDIRECT with the target URL, or GONE with any marker (X, 1, ...) to answer a 410 on URL. Domains are stripped, so both full URLs and paths are accepted.

Existing rewritten URLs are never modified by the import:

  • a URL already known by Thelia (the URL of a product, a category, ...) is redirected by a text rule, so that its object keeps its canonical URL. Turning it into a redirected URL would leave that object without any URL, which breaks the front and the URL generation.
  • a URL unknown by Thelia is redirected with the native mechanism, provided the target has a single canonical URL.

A line is reported as an error, and nothing is written for it, when:

  • the URL is the one of a product, category, content, folder or brand which is online,
  • the target is offline, or is a redirection whose object has no canonical URL any more,
  • the target ends up on the URL itself,
  • both REDIRECT and GONE are filled in, or none of them,
  • the URL is already declared as gone and is being redirected, or the other way around.

Screenshot

In "Modules" tab

RewriteUrl

In Thelia configuration

RewriteUrl

In the module configuration

RewriteUrl