PHPackages                             fromholdio/silverstripe-superlinker-redirection - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. fromholdio/silverstripe-superlinker-redirection

ActiveSilverstripe-vendormodule[HTTP &amp; Networking](/categories/http)

fromholdio/silverstripe-superlinker-redirection
===============================================

Replace for OOTB Silverstripe Redirector Page, using a SuperLink target to select a much wider range of target types

4.0.1(5d ago)11.2k1BSD-3-ClausePHP

Since Nov 22Pushed 5d ago2 watchersCompare

[ Source](https://github.com/fromholdio/silverstripe-superlinker-redirection)[ Packagist](https://packagist.org/packages/fromholdio/silverstripe-superlinker-redirection)[ Docs](https://github.com/fromholdio/silverstripe-superlinker-redirection)[ RSS](/packages/fromholdio-silverstripe-superlinker-redirection/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (10)Versions (22)Used By (0)

SilverStripe SuperLinker Redirection
====================================

[](#silverstripe-superlinker-redirection)

Advanced redirector pages and standalone redirects using SuperLink targets.

Overview
--------

[](#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
------------

[](#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
------------

[](#installation)

```
composer require fromholdio/silverstripe-superlinker-redirection
```

Run dev/build:

```
vendor/bin/sake dev/build flush=1
```

Features
--------

[](#features)

### RedirectionPage

[](#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**:

```
$redirector = RedirectionPage::create();
$redirector->Title = 'Old Product Page';
$redirector->URLSegment = 'old-product';
$redirector->write();

// Set redirect target
$redirector->RedirectLink()->LinkType = 'sitetree';
$redirector->RedirectLink()->SiteTreeID = $newPage->ID;
$redirector->RedirectLink()->write();

$redirector->publishRecursive();
```

### Redirection DataObject

[](#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**:

```
$redirect = Redirection::create();
$redirect->FromURL = '/old-path';
$redirect->StatusCode = 301;
$redirect->write();

// Set redirect target
$redirect->RedirectLink()->LinkType = 'external';
$redirect->RedirectLink()->ExternalURL = 'https://example.com/new-path';
$redirect->RedirectLink()->write();
```

Configuration
-------------

[](#configuration)

### HTTP Status Codes

[](#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

[](#hiding-redirectionpage-from-site-tree)

```
Fromholdio\SuperLinkerRedirection\Pages\RedirectionPage:
  hide_from_hierarchy: true
  hide_from_cms_menu: false
```

Usage Examples
--------------

[](#usage-examples)

### Example 1: Redirect Old Page to New Page

[](#example-1-redirect-old-page-to-new-page)

```
$redirector = RedirectionPage::create([
    'Title' => 'Old About Page',
    'URLSegment' => 'old-about'
]);
$redirector->write();

$redirector->RedirectLink()->LinkType = 'sitetree';
$redirector->RedirectLink()->SiteTreeID = $newAboutPage->ID;
$redirector->RedirectLink()->write();

$redirector->publishRecursive();
```

### Example 2: Redirect to External Site

[](#example-2-redirect-to-external-site)

```
$redirector = RedirectionPage::create([
    'Title' => 'External Resource',
    'URLSegment' => 'external-resource'
]);
$redirector->write();

$redirector->RedirectLink()->LinkType = 'external';
$redirector->RedirectLink()->ExternalURL = 'https://external-site.com/resource';
$redirector->RedirectLink()->write();

$redirector->publishRecursive();
```

### Example 3: Redirect to File Download

[](#example-3-redirect-to-file-download)

```
$redirector = RedirectionPage::create([
    'Title' => 'Download Brochure',
    'URLSegment' => 'brochure'
]);
$redirector->write();

$redirector->RedirectLink()->LinkType = 'file';
$redirector->RedirectLink()->FileID = $brochureFile->ID;
$redirector->RedirectLink()->write();

$redirector->publishRecursive();
```

### Example 4: Standalone Redirect

[](#example-4-standalone-redirect)

```
$redirect = Redirection::create([
    'FromURL' => '/old-blog/2020/article',
    'StatusCode' => 301
]);
$redirect->write();

$redirect->RedirectLink()->LinkType = 'sitetree';
$redirect->RedirectLink()->SiteTreeID = $newArticlePage->ID;
$redirect->RedirectLink()->write();
```

Admin Interface
---------------

[](#admin-interface)

Redirections can be managed through the CMS:

1. Navigate to the Redirections admin
2. Add new redirections
3. Set source URL and target link
4. Choose HTTP status code
5. Save

Migration from RedirectorPage
-----------------------------

[](#migration-from-redirectorpage)

To migrate existing RedirectorPage instances:

```
use SilverStripe\CMS\Model\RedirectorPage as CoreRedirectorPage;
use Fromholdio\SuperLinkerRedirection\Pages\RedirectionPage;

// Get all core redirector pages
$oldRedirectors = CoreRedirectorPage::get();

foreach ($oldRedirectors as $old) {
    $new = RedirectionPage::create([
        'Title' => $old->Title,
        'URLSegment' => $old->URLSegment,
        'ParentID' => $old->ParentID
    ]);
    $new->write();

    // Migrate redirect target
    if ($old->RedirectionType === 'Internal') {
        $new->RedirectLink()->LinkType = 'sitetree';
        $new->RedirectLink()->SiteTreeID = $old->LinkToID;
    } else {
        $new->RedirectLink()->LinkType = 'external';
        $new->RedirectLink()->ExternalURL = $old->ExternalURL;
    }
    $new->RedirectLink()->write();

    $new->publishRecursive();
    $old->doArchive();
}
```

Known Issues &amp; Todos
------------------------

[](#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
-------------

[](#documentation)

For complete SuperLinker documentation, see:

- [SuperLinker README](../silverstripe-superlinker/README.md)
- [SuperLinker Technical Guide](../silverstripe-superlinker/augment.md)

License
-------

[](#license)

BSD-3-Clause

Support
-------

[](#support)

- **GitHub**:
- **Issues**:

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance99

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 76.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~138 days

Recently: every ~0 days

Total

18

Last Release

5d ago

Major Versions

1.3.0 → 2.0.02024-01-07

2.1.0 → 3.0.02024-06-05

3.0.2 → 4.0.02026-05-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/40e135ad117686bee39707c1d9286cc5e915e219c26a10d13858ca44d14f1eb0?d=identicon)[dizzystuff](/maintainers/dizzystuff)

---

Top Contributors

[![dizzystuff](https://avatars.githubusercontent.com/u/576903?v=4)](https://github.com/dizzystuff "dizzystuff (39 commits)")[![xini](https://avatars.githubusercontent.com/u/1152403?v=4)](https://github.com/xini "xini (12 commits)")

---

Tags

linksilverstriperedirectionredirectssuperlinker

### Embed Badge

![Health badge](/badges/fromholdio-silverstripe-superlinker-redirection/health.svg)

```
[![Health](https://phpackages.com/badges/fromholdio-silverstripe-superlinker-redirection/health.svg)](https://phpackages.com/packages/fromholdio-silverstripe-superlinker-redirection)
```

###  Alternatives

[psr/link

Common interfaces for HTTP links

2.5k144.1M69](/packages/psr-link)[symfony/web-link

Manages links between resources

1.4k99.0M250](/packages/symfony-web-link)[fig/link-util

Common utility implementations for HTTP links

1.8k56.8M28](/packages/fig-link-util)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[upstatement/routes

Manage rewrites and routes in WordPress with this dead-simple plugin

2072.5M6](/packages/upstatement-routes)[silverstripe/restfulserver

Add a RESTful API to your SilverStripe application

49545.2k4](/packages/silverstripe-restfulserver)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
