beebmx / kirby-rickroll
Kirby Rickroll
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 2
Open Issues: 0
Type:kirby-plugin
Requires
- php: ^7.2
- getkirby/composer-installer: ^1.1
Requires (Dev)
- getkirby/cms: ^3.3
- phpunit/phpunit: ^8.5
This package is auto-updated.
Last update: 2024-11-16 10:28:51 UTC
README
Kirby Rickroll redirects some visitors than try to "break" into your site.
Installation
Composer
composer require beebmx/kirby-rickroll
Usage
After you install the package, your site will going to redirect that visitors to Rick.
The urls "protected" out of the box are:
[ "wp-login.php", "wp-admin", "user/login", "admin", "composer.lock", "yarn.lock", ".env" ]
General options
This package comes with some things to configure.
Example
Here is an example if you want to change the default settings.
In your config.php
file just:
return [ 'beebmx.kirby-rickroll.urls' => [ 'admin', 'my-secure-url', 'this-is-my-admin-url' ], 'beebmx.kirby-rickroll.redirect' => 'https://youtu.be/RfiQYRn7fBg?t=17', ];
Hook
If you want to do something when someone hit your URLs, we have you cover.
In your config.php
file just add the hook:
return [ 'hooks' => [ 'beebmx.kirby-rickroll.hit' => function ($url) { //Do something } ] ];
Inspiration
This package is inspire by the tweet of Liam Hammett.
License
Copyright © 2019-2020 Fernando Gutierrez @beebmx and contributors
Licensed under the MIT license, see LICENSE.md for details.