Download the PHP package a9f/typo3-better-redirects without Composer

On this page you can find all versions of the php package a9f/typo3-better-redirects. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package typo3-better-redirects

Better Redirects

A TYPO3 extension that replaces the built-in redirect matching with a multi-layer caching strategy optimized for large redirect sets (thousands of entries). Designed for TYPO3 13.4+ with the redirects system extension.

The Problem

TYPO3's default RedirectService queries and evaluates all redirects on every request. This works fine for small sets but becomes a bottleneck at scale.

How It Works

Redirect matching flows through three layers, each falling back to the next on a miss:

  1. Per-request result cache — database-backed cache keyed by (host, path, query), TTL up to 24 hours. Avoids repeated matching for frequently-hit URLs.
  2. PHP file cache — redirect data is compiled into PHP files in var/cache/code/better_redirects/ that are loaded and optimized by OPcache. Redirects are grouped by match type and organized into trie or hash structures for fast lookup. Files are sharded automatically when a type exceeds the threshold (default: 1,000 entries per type).
  3. TYPO3's default RedirectService — fallback if the PHP file cache is unavailable or cold.

Cache invalidation is automatic: when a redirect record is saved or deleted via the TYPO3 backend, the result cache entries and the PHP file cache for that host are flushed immediately.

Important Notes

The extension is active as soon as it is installed. No configuration is required.

TYPO3's built-in redirect cache (RedirectCacheService) is superseded by the PHP file cache and effectively becomes irrelevant. The built-in cache is still rebuilt on redirect changes (because the extension subclasses RedirectCacheService), but redirect matching never reaches it under normal operation.

The extension aliases RedirectService and RedirectCacheService to its own subclasses via Symfony DI. Any code that injects these classes by their concrete TYPO3 type will transparently receive the caching variants.

Installation

Activate the extension in the TYPO3 Extension Manager or via:

No additional configuration is required. The PHP file cache is populated automatically on the first request after installation (or after a cache flush).

Configuration

One optional setting is available via $GLOBALS['TYPO3_CONF_VARS']:

Key Default Description
EXTENSIONS/better_redirects/splitThreshold 1000 Number of redirects per match-type bucket above which the generated PHP file is split into shards

Set it in config/system/additional.php (or equivalent):

Requirements


All versions of typo3-better-redirects with dependencies

PHP Build Version
Package Version
Requires nette/php-generator Version ^4.1
typo3/cms-core Version ^13.4
typo3/cms-redirects Version ^13.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package a9f/typo3-better-redirects contains the following files

Loading the files please wait ...