PHPackages                             dorsetdigital/silverstripe-url-rewriter - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. dorsetdigital/silverstripe-url-rewriter

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

dorsetdigital/silverstripe-url-rewriter
=======================================

Rewrites the URLs of a SilverStripe site

v1.0.1(5y ago)2776BSD-3-ClausePHP

Since Sep 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/DorsetDigital/silverstripe-url-rewriter)[ Packagist](https://packagist.org/packages/dorsetdigital/silverstripe-url-rewriter)[ Docs](https://github.com/DorsetDigital/silverstripe-url-rewriter)[ RSS](/packages/dorsetdigital-silverstripe-url-rewriter/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Silverstripe URL Rewriter
=========================

[](#silverstripe-url-rewriter)

Provides a simple method of rewriting the URLs of assets. This was developed primarily for use with the SilverStripe S3 assets module, allowing a quick method of using a CloudFront distribution to serve assets instead of linking directly to the S3 bucket.

Requirements
============

[](#requirements)

\*Silverstripe 4.x

Installation
============

[](#installation)

- Install the code with `composer require dorsetdigital/silverstripe-url-rewriter`
- Run a `dev/build?flush` to update your project

Usage
=====

[](#usage)

The module won't make any changes to your site unless you do a bit of configuration. There are a few options you can set, done in a yml file:

```
---
Name: rewriteconfig
---

DorsetDigital\URLRewriter\Middleware:
  rewrite_enabled: true
  old_url: 'https://old.example.com'
  new_url: 'https://cdn-distribution.example.com'
  enable_in_dev: true
```

The options are hopefully fairly self explanatory:

- `rewrite_enabled` - globally enables and disables the module (default false - disabled)
- `old_url` - the full URL you wish to rewrite (eg. )
- `new_url` - the new URL you wish to use (eg. )
- `enable_in_dev` - enable the CDN in dev mode (default false)

Notes
=====

[](#notes)

- The module is disabled in the CMS / admin system, so rewrites do not currently happen here
- When enabled, the module will always add an HTTP header of `X-Rewrites: Enabled` to show that it's working, even if none of the other rewrite operations are carried out. If this is not present and you think it should be, ensure that you have set `cdn_rewrite` to true, that you have specified the `cdn_domain` in your config file and that you have `enable_in_dev` set to true if you are testing in dev mode.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 95.7% 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 ~266 days

Total

3

Last Release

1898d ago

Major Versions

v0.1-beta → v1.02019-09-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/ee91a8692650ac93cf817af52118adff8e11bf18866964f492f3e434e4f33f35?d=identicon)[DorsetDigital](/maintainers/DorsetDigital)

---

Top Contributors

[![DorsetDigital](https://avatars.githubusercontent.com/u/15108750?v=4)](https://github.com/DorsetDigital "DorsetDigital (22 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

silverstripecdn

### Embed Badge

![Health badge](/badges/dorsetdigital-silverstripe-url-rewriter/health.svg)

```
[![Health](https://phpackages.com/badges/dorsetdigital-silverstripe-url-rewriter/health.svg)](https://phpackages.com/packages/dorsetdigital-silverstripe-url-rewriter)
```

###  Alternatives

[silverstripe/multiuser-editing-alert

A module that indicates when people are editing the same page in the CMS

1530.7k1](/packages/silverstripe-multiuser-editing-alert)

PHPackages © 2026

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