switch_file_redirects
Turn a live deploy's _redirects file rules off or back on without redeploying, so you can stop incorrect file redirects while user rules keep applying.
Instructions
Switch the live deploy's _redirects rules off, or back on, without a deploy, for example when a deployed file sends visitors to the wrong place. User rules keep applying either way. The switch lasts until it is turned back on or the next deploy goes live. Visitors get the change within about 5 minutes. Answers NoFileRules when the live deploy has no _redirects. Confirm with the user before switching the file rules off.
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": {
"siteId": "<siteId>",
"enabled": "<enabled>"
},
"name": "switch_file_redirects"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteId | Yes | The site ID (from `list_sites`). | |
| enabled | Yes | False to stop the file rules, true to apply them again. | |
| partition | No | Data partition the site lives in. Omit to use the user's home partition. |