This function copies a ModSecurity™ rule with a new rule ID.
Important:
When you disable the Web Server role, the system disables this function.
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ modsec_clone_rule \ config='modsec2.user.conf' \ id='123456789'
{- "data": {
- "rule": {
- "config": "modsec2.user.conf",
- "config_active": 1,
- "disabled": 0,
- "id": 123456789,
- "meta_msg": "Rejected request",
- "rule": "SecRule REQUEST_URI \"/rejected.php\" \"deny,auditlog,msg:'Rejected request',id:'1'\"",
- "staged": 1,
- "vendor_active": 0,
- "vendor_id": "YourVendor"
}
}, - "metadata": {
- "command": "modsec_clone_rule",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}