Apply a rewrite rule
site_set_rewriteWrite a site's rewrite config and reload nginx, overwriting current rules. Read existing config first when updating live sites.
Instructions
Write the rewrite config for a site and reload nginx. Overwrites the current rule, so read the existing one first when changing something live.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"data": "<data>"
},
"name": "site_set_rewrite"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Full rewrite config content. | |
| path | Yes | Rewrite file path, e.g. /www/server/panel/vhost/rewrite/example.com.conf | |
| encoding | No | File encoding. | utf-8 |