Download the PHP package dmk/mk30xlegacy without Composer
On this page you can find all versions of the php package dmk/mk30xlegacy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dmk/mk30xlegacy
More information about dmk/mk30xlegacy
Files in dmk/mk30xlegacy
Package mk30xlegacy
Short Description DMK auto redirects to legacy/mirror/stale environment.
License GPL-2.0-or-later
Informations about the package mk30xlegacy
Mk 30x Legacy Redirects
This TYPO3 extension performs automatic redirects to a legacy domain if the requested uri was not found at the TYPO3.
What it does in short:
- Registers a middleware.
- Checks the TYPO3 response for unavailable status code.
- asks matchers for the uri to the new or old source to redirect to
- PageTypeSuffixRemovalMatcher:
Checks whether the url has a suffix and whether the url exists without an ending.
(Core SiteMatcher finds the uri or a HEAD request returns 200 status code). - LegacyUriMatcher:
Checks if the request uri is available at the legacy domain
(returns 200 status code on HEAD request).
- PageTypeSuffixRemovalMatcher:
- Performs a redirect to the new uri.
Installation
Install TYPO3 via composer.
From project root you need to run
Configuration
The base configuration is done by extension configuration.
Use The Admin Tools > Settings > Configure Extensions module to configure mk30xlegacy.
The configuration can be overridden by site configuration
or site language configuration.
Use the Site Management > Sites module to configure the extension.
- enabled
Enables the legacy redirect middleware. (default: 1) - responseMatchPattern
Response match pattern: Regex to match with current request http response code to perform legacy redirect. (default: [345]\d\d) - suffixRemovalSuffixes
Page Type Suffixes: A comma seperated list of suffixes to remove from request uri. (default: html,htm,xhtml) - redirectDomain
Redirect Domain: Domain to performe the legacy redirect to. - redirectDomainAvailabilityMatchPattern
Legacy availability match pattern: Regex to match with http response code from legacy check. On match a redirect to legacy domain will be performed. (default: 2\d\d) - redirectResponseStatusCode
Redirect Response HTTP-Status-Code: The HTTP-Status Code used for redirects to legacy domain. (default: 307)
Add Custom Matcher
The redirect middleware uses a matcher registry, so custom matchers can be developed.
Add the custom matcher in your Services.yaml
:
Custom legacy uri manipulation
You can register an event listener before the availability check of the LegacyUriMatcher is performed, to manipulate the legacy url by your own (we recommend to use a custom matcher instead!):
Add the custom listener in your Services.yaml
: