Kirby Rickroll redirects some visitors than try to "break" into your site.
composer require beebmx/kirby-rickroll
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"
]
This package comes with some things to configure.
Option | Value | Description |
---|---|---|
beebmx.kirby-rickroll.urls | (array) | An array of URLs to "protect" |
beebmx.kirby-rickroll.redirect | (string) | An url to redirect when a protected one is hit |
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',
];
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
}
]
];
This package is inspire by the tweet of Liam Hammett.
Copyright © 2019-2020 Fernando Gutierrez @beebmx and contributors
Licensed under the MIT license, see LICENSE.md for details.