PHPackages                             axllent/silverstripe-trailing-slash - 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. axllent/silverstripe-trailing-slash

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

axllent/silverstripe-trailing-slash
===================================

Ensure that a single trailing slash is always added to the URL

2.2.8(1y ago)11188.5k↓51.6%45MITPHP

Since Dec 21Pushed 1y ago2 watchersCompare

[ Source](https://github.com/axllent/silverstripe-trailing-slash)[ Packagist](https://packagist.org/packages/axllent/silverstripe-trailing-slash)[ Docs](https://github.com/axllent/silverstripe-trailing-slash)[ RSS](/packages/axllent-silverstripe-trailing-slash/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (10)Dependencies (1)Versions (19)Used By (5)

Silverstripe Trailing Slash
===========================

[](#silverstripe-trailing-slash)

Ensure that a single trailing slash is always added to the URL.

Only GET and HEAD requests are redirected, excluding URLS that contain a file extension or query parameter. Detected ajax requests are also ignored.

Note:
-----

[](#note)

This module is no longer actively developed since the majority of the functionality is handled natively within Silverstripe 5 &amp; 6. To enable trailing slashes **without** the need for this module, simply add the following to your yaml configuration:

```
SilverStripe\Control\Controller:
  add_trailing_slash: true
```

This module has been kept alive for the list of [depended modules](https://github.com/axllent/silverstripe-trailing-slash/network/dependents).

Examples
--------

[](#examples)

- `example.com/contact` is redirected to `example.com/contact/`
- `example.com/contact//` is redirected to `example.com/contact/`
- `example.com/contact?test` is not redirected
- `example.com/contact.html` is not redirected

Requirements
------------

[](#requirements)

- Silverstripe ^4.0 || ^ 5.0 || ^6.0

For Silverstripe 3, please refer to the [Silverstripe3 branch](https://github.com/axllent/silverstripe-trailing-slash/tree/silverstripe3).

Installation and configuration
------------------------------

[](#installation-and-configuration)

```
composer require axllent/silverstripe-trailing-slash

```

- Run `?flush=1`

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

[](#configuration)

By default it will ignore any `admin/` &amp; `dev/` URLs, as well as all ajax requests. It also only acts on `$_GET` requests as not to interfere with any posted data, and ignores any URL containing an extension (eg: `/contact.html`) or query parameter.

You can create additional "ignore\_paths" by creating a yaml config (eg: `app/_config/trailing-slash.yml`):

```
Axllent\TrailingSlash\Middleware\TrailingSlashRedirector:
  ignore_paths:
    - 'events'
    - 'my/other/path'
```

These paths are relative to the base URL (`/`), so `events` will not match `/page/events`, but will match `/events-2020`.

Please note that paths do not typically contain a trailing slash unless it is only underlying URLs you wish to redirect. Wildcards etc are not supported in the syntax.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance48

Moderate activity, may be stable

Popularity41

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 88.1% 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 ~216 days

Recently: every ~415 days

Total

17

Last Release

386d ago

Major Versions

1.0.0 → 2.0.02017-07-27

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1463435?v=4)[Ralph Slooten](/maintainers/axllent)[@axllent](https://github.com/axllent)

---

Top Contributors

[![axllent](https://avatars.githubusercontent.com/u/1463435?v=4)](https://github.com/axllent "axllent (52 commits)")[![3Dgoo](https://avatars.githubusercontent.com/u/2616373?v=4)](https://github.com/3Dgoo "3Dgoo (2 commits)")[![mattclegg](https://avatars.githubusercontent.com/u/303487?v=4)](https://github.com/mattclegg "mattclegg (2 commits)")[![lars-lemon8](https://avatars.githubusercontent.com/u/15701748?v=4)](https://github.com/lars-lemon8 "lars-lemon8 (1 commits)")[![obj63mc](https://avatars.githubusercontent.com/u/443120?v=4)](https://github.com/obj63mc "obj63mc (1 commits)")[![wilr](https://avatars.githubusercontent.com/u/101629?v=4)](https://github.com/wilr "wilr (1 commits)")

---

Tags

silverstripeseourls

### Embed Badge

![Health badge](/badges/axllent-silverstripe-trailing-slash/health.svg)

```
[![Health](https://phpackages.com/badges/axllent-silverstripe-trailing-slash/health.svg)](https://phpackages.com/packages/axllent-silverstripe-trailing-slash)
```

###  Alternatives

[silverstripe/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1371.1M85](/packages/silverstripe-userforms)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)[cyber-duck/silverstripe-seo

A SilverStripe module to optimise the Meta, crawling, indexing, and sharing of your website content

4351.3k](/packages/cyber-duck-silverstripe-seo)[hubertusanton/silverstripe-seo

SEO module for Silverstripe

4523.3k2](/packages/hubertusanton-silverstripe-seo)[silverstripers/seo

SEO for SilverStripe websites

1145.4k](/packages/silverstripers-seo)

PHPackages © 2026

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