Download the PHP package fromholdio/silverstripe-superlinker-redirection without Composer
On this page you can find all versions of the php package fromholdio/silverstripe-superlinker-redirection. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fromholdio/silverstripe-superlinker-redirection
More information about fromholdio/silverstripe-superlinker-redirection
Files in fromholdio/silverstripe-superlinker-redirection
Package silverstripe-superlinker-redirection
Short Description Replace for OOTB Silverstripe Redirector Page, using a SuperLink target to select a much wider range of target types
License BSD-3-Clause
Homepage https://github.com/fromholdio/silverstripe-superlinker-redirection
Informations about the package silverstripe-superlinker-redirection
SilverStripe SuperLinker Redirection
Advanced redirector pages and standalone redirects using SuperLink targets.
Overview
Replaces SilverStripe's built-in RedirectorPage with a more powerful system that:
- Supports all SuperLink types (not just internal/external)
- Provides standalone Redirection DataObjects
- Offers HTTP status code selection
- Includes collision detection
- Supports custom URL paths
Requirements
- SilverStripe CMS ^6.0
- fromholdio/silverstripe-superlinker ^4.0.0
- fromholdio/silverstripe-relativeurlfield ^2.0.0
- fromholdio/silverstripe-hidden-pages ^3.0.0
- fromholdio/silverstripe-hasoneedit ^3.0.1
Installation
Run dev/build:
Features
RedirectionPage
A page type that redirects to any SuperLink target.
Features:
- Redirect to any link type (SiteTree, External, Email, File, System, etc.)
- HTTP status code selection (301, 302, 303, 307, 308)
- Hidden from site tree by default
- Automatic redirect on page load
Usage:
Redirection DataObject
Standalone redirects not tied to pages.
Features:
- Redirect from custom URL paths
- Collision detection with site tree
- HTTP status code selection
- Admin interface for management
Usage:
Configuration
HTTP Status Codes
Available status codes:
- 301 - Moved Permanently (default for SEO)
- 302 - Found (temporary redirect)
- 303 - See Other
- 307 - Temporary Redirect (preserves method)
- 308 - Permanent Redirect (preserves method)
Hiding RedirectionPage from Site Tree
Force redirections over live pages
By default a RedirectionSuperLink fires only as a 404 fallback: if a published page already exists at the redirection's origin URL, that page is served and the redirect never runs.
Set do_force_redirections to make redirections take precedence over the site tree — a matching redirect then fires even when a live page exists at the URL, checked in onBeforeInit before the page controller renders (comparable to Misdirection's enforce mode):
- Default is
false— the original 404-fallback behaviour is unchanged. - Reserved paths in
disallowed_redirect_origin_url_paths(/admin,/dev, …) are never redirected. - Site/host scoping still applies: the check runs in controller context and invokes the
updateRedirectionsFilterextension hook, so any multisiteSiteIDnarrowing works the same as in fallback mode. - Force mode queries
RedirectionFromRelativeURLon every request; it's indexed on the model — rundev/buildafter upgrading.
Usage Examples
Example 1: Redirect Old Page to New Page
Example 2: Redirect to External Site
Example 3: Redirect to File Download
Example 4: Standalone Redirect
Admin Interface
Redirections can be managed through the CMS:
- Navigate to the Redirections admin
- Add new redirections
- Set source URL and target link
- Choose HTTP status code
- Save
Migration from RedirectorPage
To migrate existing RedirectorPage instances:
Known Issues & Todos
- Validation improvements needed
- File has-many redirects field
- Site tree has-many redirects field improvements
- Proper i18n/translations
- Link tracking/syncing
Documentation
For complete SuperLinker documentation, see:
- SuperLinker README
- SuperLinker Technical Guide
License
BSD-3-Clause
Support
All versions of silverstripe-superlinker-redirection with dependencies
fromholdio/silverstripe-superlinker Version ^4.0.0
fromholdio/silverstripe-relativeurlfield Version ^2.0.0
fromholdio/silverstripe-hidden-pages Version ^3.0.0
fromholdio/silverstripe-hasoneedit Version ^3.0.1