PHPackages                             nyeholt/silverstripe-restrictedcms - 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. [Security](/categories/security)
4. /
5. nyeholt/silverstripe-restrictedcms

ActiveSilverstripe-module[Security](/categories/security)

nyeholt/silverstripe-restrictedcms
==================================

A SilverStripe CMS module that will force users to a different hostname when hitting protected URLs.

11.1k11PHP

Since May 29Pushed 7y ago1 watchersCompare

[ Source](https://github.com/nyeholt/silverstripe-restrictedcms)[ Packagist](https://packagist.org/packages/nyeholt/silverstripe-restrictedcms)[ RSS](/packages/nyeholt-silverstripe-restrictedcms/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

Restricted CMS
==============

[](#restricted-cms)

> A SilverStripe CMS module that will force users to a different hostname when hitting protected URLs.

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

[](#requirements)

- SilverStripe 3.2.x

Getting Started
---------------

[](#getting-started)

- Place the module under your root project directory.
- `/dev/build`
- Create a restrictedcms.yml file in your project \_config/ folder, with config similar to that found in docs/en/restrictedcms.yml.sample

Overview
--------

[](#overview)

The restricted CMS module works by intercepting incoming requests to the CMS and comparing them against a set of patterns for particular hosts, to determine whether they should be allowed to be served by the current server.

This provides two layers of protection

- Verifying the HTTP\_HOST presented by the end user is allowed to be served by 'this' server
- Allowing requests to particular URLs to be redirected to different hostnames, which in turn may be behind a firewall somewhere.

Specific environment configuration
----------------------------------

[](#specific-environment-configuration)

If you have a separate authoring instance (ie cms.mysite.com) to your main site (eg [www.mysite.com](http://www.mysite.com)), you can specify configuration that is loaded just for the specific environment. Using the sample restrictedcms.yml.sample file, the config blocks for each environment can be included / excluded by making use of the ENV\_TYPE\_FRONTEND or ENV\_TYPE\_BACKEND defines from your \_ss\_environment.php in the respective environments.

As SilverStripe's configuration layer only allows the swapping based on `define`d properties, you may need a fragment like the following if you're setting these properties via environment variables from your webserver

```
foreach (array('ENV_PROD', 'ENV_TEST', 'ENV_TYPE_FRONTEND', 'ENV_TYPE_BACKEND') as $envVar) {
    if (getenv($envVar)) {
        define($envVar, 1);
    }
}

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/25cb1c56a7ab949d1e6b28a2a04862ce1cffe1799a291e1797f8dfd33cd83716?d=identicon)[nyeholt](/maintainers/nyeholt)

---

Top Contributors

[![nyeholt](https://avatars.githubusercontent.com/u/161730?v=4)](https://github.com/nyeholt "nyeholt (1 commits)")

### Embed Badge

![Health badge](/badges/nyeholt-silverstripe-restrictedcms/health.svg)

```
[![Health](https://phpackages.com/badges/nyeholt-silverstripe-restrictedcms/health.svg)](https://phpackages.com/packages/nyeholt-silverstripe-restrictedcms)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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