PHPackages                             c6digital/laravel-site-redirect - 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. c6digital/laravel-site-redirect

ActiveLibrary[HTTP &amp; Networking](/categories/http)

c6digital/laravel-site-redirect
===============================

A small package to redirect all requests elsewhere.

v1.0.0(6mo ago)1873↓50%[4 PRs](https://github.com/c6digital/laravel-site-redirect/pulls)MITPHPPHP ^8.2CI passing

Since Jul 17Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/c6digital/laravel-site-redirect)[ Packagist](https://packagist.org/packages/c6digital/laravel-site-redirect)[ Docs](https://github.com/c6digital/laravel-site-redirect)[ RSS](/packages/c6digital-laravel-site-redirect/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (15)Versions (9)Used By (0)

A small package to redirect all requests elsewhere.
===================================================

[](#a-small-package-to-redirect-all-requests-elsewhere)

[![Latest Version on Packagist](https://camo.githubusercontent.com/93429b34a768f58c4217dad850cb06aed02b09a53a83690f83cd55cf3a5a65ab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63366469676974616c2f6c61726176656c2d736974652d72656469726563742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/c6digital/laravel-site-redirect)[![GitHub Tests Action Status](https://camo.githubusercontent.com/29907d6e50e743e95e52098821568b08cd19bfac3069966e4f4c7388358745dc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63366469676974616c2f6c61726176656c2d736974652d72656469726563742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/c6digital/laravel-site-redirect/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/24a8ecd0f079a2151369b61c466b150b2ce209787a72f2b3a71529c2c0ad12a2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63366469676974616c2f6c61726176656c2d736974652d72656469726563742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/c6digital/laravel-site-redirect/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/1a96783077d4048c5b1ec21dd4b13dc05ed9fde801f5ef9f7253cb70d6f9443c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63366469676974616c2f6c61726176656c2d736974652d72656469726563742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/c6digital/laravel-site-redirect)

This package can be used to redirect all requests to a site elsewhere with the flick of an environment variable.

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require c6digital/laravel-site-redirect
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-site-redirect-config"
```

Usage
-----

[](#usage)

Use environment variables to enable &amp; disable the redirect and configure the redirect location.

```
SITE_REDIRECT_ENABLED=true
SITE_REDIRECT_LOCATION=https://my-site.test
```

> The middleware that handles the redirect is registered globally by the package.

### Bypassing redirects

[](#bypassing-redirects)

There are times when you want to allow somebody to bypass the redirect mechanism. This can be achieved with a "bypass token".

Start by specifying the bypass token as an environment variables.

```
SITE_REDIRECT_BYPASS_TOKEN=example-token

```

To bypass the redirect, simply provide the bypass token in the query string of the request.

```
https://my-site.test/?bypass_token=example-token

```

This will let you access the site as normal. The bypass will be active for 1 hour so subsequent requests will not require a token.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ryan Chandler](https://github.com/c6digital)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance80

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~274 days

Total

4

Last Release

208d ago

Major Versions

v0.2.0 → v1.0.02025-10-17

PHP version history (2 changes)v0.1.0PHP ^8.1

v1.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/568d485d441c691b0358b9091254a6a671fef8f76b73f28af1180ad568d142b2?d=identicon)[ryangjchandler](/maintainers/ryangjchandler)

---

Top Contributors

[![ryangjchandler](https://avatars.githubusercontent.com/u/41837763?v=4)](https://github.com/ryangjchandler "ryangjchandler (15 commits)")[![c6andy](https://avatars.githubusercontent.com/u/213634680?v=4)](https://github.com/c6andy "c6andy (9 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

laravelc6digitallaravel-site-redirect

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/c6digital-laravel-site-redirect/health.svg)

```
[![Health](https://phpackages.com/badges/c6digital-laravel-site-redirect/health.svg)](https://phpackages.com/packages/c6digital-laravel-site-redirect)
```

###  Alternatives

[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[sunchayn/nimbus

A Laravel package providing an in-browser API client with automatic schema generation, live validation, and built-in authentication with a touch of Laravel-tailored magic for effortless API testing.

29428.0k](/packages/sunchayn-nimbus)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[pdphilip/cf-request

Cloudflare Laravel Request

2725.6k1](/packages/pdphilip-cf-request)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

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