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.
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 |