Skip to content
Neos RedirectHandler adapter for Neos CMS for creating redirects and status codes
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Classes
Configuration
Documentation
Tests
.styleci.yml TASK: Add StyleCI configuration file Nov 29, 2016
LICENSE.txt
README.md
composer.json

README.md

Neos redirect handler

This package enables automatic redirects for renamed/moved pages. This helps with SEO and user experience by avoiding dead links.

Additionally a 410 (gone) status code will be given for removed pages instead of 404 (not found).

Installation

To use the redirect package, you have to install this package

composer require "neos/redirecthandler-neosadapter"

and additionally a storage package. A default one for storing redirects in the database can be installed using composer with

composer require "neos/redirecthandler-databasestorage"

Configuration

Note: When using this to handle redirects for persistent resources, you must adjust the default rewrite rules! By default, any miss for _Resources/… stops the request and returns a 404 from the webserver directly:

# Make sure that not existing resources don't execute Flow
RewriteRule ^_Resources/.* - [L]

For the redirect handler to even see the request, this has to be removed. Usually the performance impact can be neglected, since Flow is only hit for resources that once existed and to which someone still holds a link.

Restrict generation

It is possible to restrict the generation of redirects to a certain node path or node type. For instance, you can user in an multi site environment or avoid massive redirect generation if you don't need it.

restrictByNodeType

Restrict redirect generation by node type.

restrictByNodeType:
  Neos.Neos:Document: true

restrictByPathPrefix

Restrict redirect generation by node path prefix.

Note: No redirect will be created if you move a node within the restricted path or if you move it away from the restricted path. But if you move a node into the restricted path the restriction rule will not apply, because the restriction is based on the source node path.

restrictByPathPrefix:
  - '/sites/neosdemo': true
You can’t perform that action at this time.