flowpack / seo-routing
Flow Framework Router to ensure a trailing slash in Neos.
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 11
Forks: 0
Open Issues: 1
Type:neos-package
Requires
- php: ^8.1
- guzzlehttp/psr7: ^2.0
- neos/flow: ^8.3
Requires (Dev)
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^11.5
This package is auto-updated.
Last update: 2025-01-21 11:42:23 UTC
README
Sponsoring
Thank you Biallo & Team GmbH for sponsoring the work from Sandstorm on this package.
Introduction
This package allows you to enforce a trailing slash and/or lower case urls in Flow/Neos.
Features
This package has 2 main features:
- trailingSlash: ensure that all links ends with a trailing slash (e.g.
example.com/test/
instead ofexample.com/test
) - toLowerCase: ensure that camelCase links gets redirected to lowercase (e.g.
example.com/lowercase
instead ofexample.com/lowerCase
)
You can de- and activate both of them.
Another small feature is to restrict all new neos pages to have a lowercased uriPathSegment
. This is done by
extending the NodeTypes.Document.yaml
.
Installation
Just require it via composer:
composer require flowpack/seo-routing
Configuration
Standard Configuration
In the standard configuration we have activated the trailingSlash (to redirect all uris without a / at the end to an uri with / at the end) and do all redirects with a 301 http status.
Note: The lowercase redirect is deactivated by default, because you have to make sure, that there is
no uriPathSegment
with camelCase or upperspace letters - this would lead to redirects in the neverland.
Flowpack:
SeoRouting:
redirect:
enable:
trailingSlash: true
toLowerCase: false
statusCode: 301
blocklist:
'/neos.*': true
Blocklist for redirects
By default, all /neos
URLs are ignored for redirects. You can extend the blocklist array with regex as you like:
Flowpack: SeoRouting: blocklist: '/neos.*': true
Thank you
This package originates from https://github.com/t3n/seo-routing.
Thank you, T3N and associates for your work.