Configuration
Create a config/not-found-redirects.php file to customise plugin behaviour. This should have been copied automatically on installation.
<?php
return [
'createUriChangeRedirects' => true,
'autoRedirectStatusCode' => 302,
];Settings can be overridden per-environment using multi-environment config.
Configuration options
Auto Redirects
createUriChangeRedirects
- ENV
none- Accepts
bool- Default
true
Auto-create redirects when element URIs change.
autoRedirectStatusCode
- ENV
none- Accepts
int- Default
302
Status code for auto-created redirects (301 or 302). 302 is chosen by default to avoid unintended consequences of 301s being cached by browsers and CDNs.
Garbage Collection
See the Garbage Collection page for full documentation, console commands, and configuration.
Pipeline Events
The 404 handling pipeline can be customized using events on NotFoundUriService. Four events fire during 404 handling, letting you gate requests, modify URIs, transform destinations, and hook into analytics.
See the Events page for full documentation, event properties, and examples.