pubvana / redirects
Redirection Manager for Pubvana CMS
Requires
- php: ^8.1
- enlivenapp/flight-school: ^0.3
- enlivenapp/flight-settings: ^0.2
- enlivenapp/flight-shield: ^0.2
- enlivenapp/migrations: ^0.2
- flightphp/active-record: ^0.7
Suggests
- pubvana/admin: Admin UI for theme selection and management
README
Pubvana Redirects
I noticed folks downloading some of these packages. I'm super grateful, Thank You! I would like to let folks know until this notice disappears I'm doing a lot of breaking changes without worrying about them. Once versions are up around 0.5.x things should settle down.
Redirect and broken-link management for Pubvana CMS.
Related Docs
- Project docs index: docs/README.md
- Pubvana roadmap: docs/PUBVANA-ROADMAP.md
- Admin extension points: docs/ADMIN-EXTENSION-SYSTEM.md
Features
- Admin CRUD for exact-path redirects
- Incoming broken-link (
404) manager - Internal path or external URL targets
301and302status codes- Enable/disable per redirect
- Hit counting and last-hit timestamp
- Runtime request interception before normal routing
- Incoming 404 logging with ignore / delete / create-redirect workflow
Installation
composer require pubvana/redirects
Enable in app/config/config.php:
'plugins' => [ 'pubvana/redirects' => [ 'enabled' => true, 'priority' => 50, ], ],
Flight School config
This package uses Flight School's return-array config format. src/Config/Config.php returns the package defaults as an array, and Flight School stores that array under pubvana.redirects on $app.
That returned array currently includes 'routePrepend' => 'redirects'. This package currently ships admin routes only, so its UI remains under /admin/redirects and /admin/404-manager.
Structure
This plugin follows the standard Pubvana / Flight School package shape:
src/Plugin.phpsrc/Controllers/RedirectsAdminController.phpsrc/Services/RedirectsService.phpsrc/Models/Redirect.phpsrc/Database/Migrations/src/Views/redirects/
Services
Mapped as:
$app->redirects()$app->incomingBrokenLinks()
Common responsibilities:
- manage redirect records
- intercept matching incoming requests
- log unresolved 404 requests
- expose 404-manager data for admin review
Admin
Admin screens include:
/admin/redirects/admin/redirects/create/admin/404-manager
Notes
- Redirect matching is exact-path only in this first pass.
- Query strings are ignored for matching, but preserved onto the redirect target.
- Admin and API paths are skipped by default at runtime.
- Incoming 404 logging is tracked separately from redirect rules.
Requirements
- PHP ^8.1
- enlivenapp/flight-school ^0.2
- enlivenapp/flight-shield
- enlivenapp/migrations
- flightphp/active-record ^0.7
- pubvana/admin
License
MIT