Adds a ban on access by ip address, in accordance with the rules
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist mrssoft/yii2-deny-trash "*"
or add
"mrssoft/yii2-deny-trash": "*"
to the require section of your composer.json
file.
Configuration:
'components' => [
...
'log' => [
'targets' => [
[
'class' => 'mrssoft\denytrash\DenyTrashTarget',
'levels' => ['error'],
'serverType' => 'Apache',
'excludeIp' => ['195.206.45.15'],
'enabled' => true,
],
]
....
]
.htaccess:
...
order deny,allow
...
Setting rules in a file options.json