WebBlocks Redirect Manager
Requirements
Documented package version: 0.1.18. WebBlocks CMS ^1.32; PHP >=8.1.
WebBlocks Redirect Manager is a small WebBlocks CMS plugin for creating and managing simple 301/302 redirects from the WebBlocks CMS admin area.
Compatibility
- Plugin handle:
webblocks-redirect-manager - Plugin version:
0.1.18 - Target host product:
webblocks-cms - Required CMS version:
^1.32 - PHP:
>=8.1
Manual ZIP Install Flow
- Build the plugin artifact locally:
composer plugin:build - Upload
build/releases/webblocks-redirect-manager-0.1.18.zipto the WebBlocks CMS plugin upload flow. - After upload, the CMS should register the plugin in a disabled state first.
- Review the plugin metadata and permissions.
- Enable the plugin when ready.
- Run the plugin migration through the CMS plugin lifecycle or migration command required by the host installation.
Setup And Migration
The plugin owns one table:
webblocks_redirect_manager_redirects
The migration creates redirect records with:
source_pathtarget_urlstatus_codeis_enabledhit_countlast_hit_at- timestamps
Permissions
webblocks-redirect-manager.viewwebblocks-redirect-manager.manage
Runtime Redirects
- Enabled redirects are evaluated for unmatched public
GETandHEADrequests before the CMS returns a 404. - CMS 1.32.112 discovers installed plugin providers for
definition()metadata but does not register or boot them as Laravel service providers. Redirect Manager therefore registers its public fallback route fromdefinition()instead of relying on providerboot()middleware group mutation. POST,PUT,PATCH, andDELETErequests are bypassed.- Admin and static namespaces are bypassed, including
/webadmin/...,/cms/...,/storage/...,/assets/...,/static/...,/build/...,/vendor/..., and/webblocks-ui/.... - Source paths are normalized with one leading slash and no trailing slash, so
/test-1,test-1, and/test-1/match the same rule. - Incoming query strings are ignored for matching.
/test-1?x=1matches source/test-1. - Incoming query strings are not appended to the target URL. A rule from
/test-1to/test-2redirects/test-1?x=1to/test-2. - Matching
GETandHEADredirects both incrementhit_countand updatelast_hit_at. - Self-target internal redirects are rejected during admin create/edit validation and bypassed at runtime as a loop guard.
- If the plugin table is missing because plugin migrations have not been run, public requests bypass the middleware without a SQL error.
Hit Counter Testing
Browsers may cache 301 redirects. While testing hit counters, use 302 redirects, clear browser cache, use incognito, or test with curl.
Limitations
- Plugin migrations are not run automatically; run them through the CMS plugin lifecycle when installing or updating.
- No npm, Vite, Tailwind, Node, marketplace, payment, licensing, remote install, or auto-update behavior is included.