ublaboo/https-redirect-nette-extension

Nette 扩展,用于将用户简单地重定向到具有不同协议的相同 URL

v1.0.1 2017-06-07 14:06 UTC

This package is auto-updated.

Last update: 2024-09-21 00:59:40 UTC


README

Latest Stable Version License Total Downloads Gitter

HttpsRedirectNetteExtension

1、通过 composer 安装

composer require ublaboo/https-redirect-nette-extension

2、在 config.neon 中注册扩展

extensions:
	httpsRedirect: Ublaboo\HttpsRedirectNetteExtension\DI\HttpsRedirectNetteExtension

3、指定哪些演示者需要受到保护(如果未指定演示者名称,则所有演示者都将受到保护)。格式为 - 模块:模块:演示者

httpsRedirect:
	redirectTo: https # Set ot "http" for redirecting from https to http
	redirectCode: 301 # Change it to any other code you want,
	enable: true # or false :P