Review main Merged

55358[FEATURE] Add system extension "redirects"

Benni Mack CR +2 V +2 Expert +2033 −0 updated 01/23/18, 15:34

Commit message

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

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 26

Show 6 more files