[FEATURE] Add system extension "redirects" 58/55358/50
authorBenni Mack <benni@typo3.org>
Sat, 13 Jan 2018 21:31:58 +0000 (22:31 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Tue, 23 Jan 2018 15:34:53 +0000 (16:34 +0100)
[FEATURE] Add system extension "redirects"

A new system extension "redirects" is added, which ships a flexible
handling of HTTP redirects, useful both for marketeers and
site administrators.

It adds a new module called "Site Management => Redirects".

Site Management will be the starting point also for templating and
domain setups in the future.

A new DB table "sys_redirect" is added, which allows to configure
a redirect from a source (host+path) to a destination target.
The destination target can be any kind of Uri
(used by the LinkService).

In the short run, redirects superseeds the redirect logic from
sys_domain.redirectTo (see followup patch), but more features
are already sketched out, however, this change only
adds the basic functionality.

Any time a redirect is added or modified, a list
of all redirects is added to the cache management,
allowing to fetch all redirects at once,
reducing the number of queries to the DB in the
frontend to 1 query (or to one query to the FS, as
the power lies in the caching framework).

A simple hit statistics counter is implemented as well.

The redirects functionality later will serve
for URL Routing if a page will be registered under
a different URL, and a redirect could automatically be added.

Further improvements (out of scope for this change):
- Move icons into the TYPO3 iconset
- Check for recursive / loops, or existing redirects
- Add further conditions for redirects
- Export redirects as VCL, nginx or .htaccess rules for performance reasons
- Bulk import of redirects
- Selection of existing sys_domain redirects in source_
- Sanitize source_host to only include a domain name, and/or allow ports
- Allow query parameters in source_path

Resolves: #83631
Releases: master
Change-Id: Ibf25c2ee07f41edbaf14b97a7f115d36f901cc62
Reviewed-on: https://review.typo3.org/55358
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Reiner Teubner <reiner.teubner@me.com>
Tested-by: Reiner Teubner <reiner.teubner@me.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Tobi Kretschmann <tobi@tobishome.de>
Tested-by: Tobi Kretschmann <tobi@tobishome.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
26 files changed:
typo3/sysext/core/Documentation/Changelog/master/Feature-83631-SystemExtensionRedirectsHasBeenAdded.rst [new file with mode: 0644]
typo3/sysext/redirects/Classes/Controller/ManagementController.php [new file with mode: 0644]
typo3/sysext/redirects/Classes/Evaluation/SourceHost.php [new file with mode: 0644]
typo3/sysext/redirects/Classes/Evaluation/SourcePath.php [new file with mode: 0644]
typo3/sysext/redirects/Classes/FormDataProvider/ValuePickerItemDataProvider.php [new file with mode: 0644]
typo3/sysext/redirects/Classes/Hooks/DataHandlerCacheFlushingHook.php [new file with mode: 0644]
typo3/sysext/redirects/Classes/Http/RedirectHandler.php [new file with mode: 0644]
typo3/sysext/redirects/Classes/Service/RedirectCacheService.php [new file with mode: 0644]
typo3/sysext/redirects/Classes/Service/RedirectService.php [new file with mode: 0644]
typo3/sysext/redirects/Classes/ViewHelpers/EditRecordViewHelper.php [new file with mode: 0644]
typo3/sysext/redirects/Configuration/TCA/sys_redirect.php [new file with mode: 0644]
typo3/sysext/redirects/Resources/Private/Language/locallang_db.xlf [new file with mode: 0644]
typo3/sysext/redirects/Resources/Private/Language/locallang_module_redirect.xlf [new file with mode: 0644]
typo3/sysext/redirects/Resources/Private/Layouts/RedirectAdministration.html [new file with mode: 0644]
typo3/sysext/redirects/Resources/Private/Templates/Management/Overview.html [new file with mode: 0644]
typo3/sysext/redirects/Resources/Public/Icons/Extension.png [new file with mode: 0644]
typo3/sysext/redirects/Resources/Public/Icons/repeat_64x64.png [new file with mode: 0644]
typo3/sysext/redirects/Tests/Unit/FormDataProvider/ValuePickerItemDataProviderTest.php [new file with mode: 0644]
typo3/sysext/redirects/Tests/Unit/Service/RedirectServiceTest.php [new file with mode: 0644]
typo3/sysext/redirects/composer.json [new file with mode: 0644]
typo3/sysext/redirects/ext_emconf.php [new file with mode: 0644]
typo3/sysext/redirects/ext_localconf.php [new file with mode: 0644]
typo3/sysext/redirects/ext_tables.php [new file with mode: 0644]
typo3/sysext/redirects/ext_tables.sql [new file with mode: 0644]