PHP code example of terminal42 / contao-url-rewrite
1. Go to this page and download the library: Download terminal42/contao-url-rewrite library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
terminal42 / contao-url-rewrite example snippets
Type: expert
Path restriction: home.php
Request condition: context.getMethod() == 'GET' and request.query.has('page')
Response code: 301 Moved Permanently
Response URI: {{link_url::{page}|absolute}}
---
Result: domain.tld/home.php?page=123 → domain.tld/foobar-123.html