beebmx/kirby-rickroll

Kirby Rickroll

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 1

Forks: 0

Open Issues: 0

Type:kirby-plugin

1.0.0 2020-05-15 23:08 UTC

This package is auto-updated.

Last update: 2022-01-16 04:10:01 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.

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

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.