Download the PHP package terminal42/contao-url-rewrite without Composer
On this page you can find all versions of the php package terminal42/contao-url-rewrite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download terminal42/contao-url-rewrite
More information about terminal42/contao-url-rewrite
Files in terminal42/contao-url-rewrite
Package contao-url-rewrite
Short Description URL Rewrite bundle for Contao Open Source CMS
License MIT
Informations about the package contao-url-rewrite
URL Rewrite bundle for Contao Open Source CMS
The extension provides a new way for Contao to set various URL rewrites. The available config providers are:
- Bundle config provider – the entries are taken from
config.yml
file - Database provider – the entries are taken from backend module
Behind the scenes the rules are added as routes to the internal application router which allows to use all the features provided by the Symfony Routing component.
Installation
Install the bundle via Composer:
Migration of short URLs
Since the extension fritzmg/contao-short-urls has been abandoned, you can migrate short URLs to URL rewrites with the extension bwein-net/contao-migrate-short-urls.
Configuration
Bundle configuration
The bundle configuration is optional. Here you can define the entries and disable the backend management module.
Note: if you want to use the %
character, make sure it is properly escaped by doubling it %%
.
Running under non Contao managed edition
If you are running the Contao Managed Edition then the extension should work out of the box. For all the other systems you have to additionally register the routing configuration in the config files:
Examples
-
Find address on Google Maps:
-
Redirect to a specific news entry:
-
Rewrite legacy URLs with query string:
- Rewrite URLs including slashes (without query string) to new domain:
Create a custom config provider
In addition to the existing providers you can create your own class that provides the rewrite configurations. The new service must implement the Terminal42\UrlRewriteBundle\ConfigProvider\ConfigProviderInterface interface and be registered with the appropriate tag:
Resources
All versions of contao-url-rewrite with dependencies
contao/core-bundle Version ^4.13 || ^5.0
symfony/config Version ^5.0 || ^6.0
symfony/dependency-injection Version ^5.0 || ^6.0
symfony/expression-language Version ^5.0 || ^6.0
symfony/filesystem Version ^5.0 || ^6.0
symfony/http-foundation Version ^5.0 || ^6.0
symfony/http-kernel Version ^5.0 || ^6.0
symfony/routing Version ^5.0 || ^6.0
bacon/bacon-qr-code Version ^2.0
doctrine/dbal Version ^2.11 || ^3