SetRewriteTel
将自定义 URL 重写(伪静态)规则保存为模板文件。
- 路由:
POST /site - action:
SetRewriteTel
输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| action | 是 | String | 固定值 SetRewriteTel |
| name | 是 | String | 模板名称(不含路径和扩展名) |
| data | 是 | String | 重写规则内容 |
输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| status | Boolean | true 保存成功 |
| msg | String | 已保存URL重写规则到模板! |
示例
请求
POST /site HTTP/1.1
Host: 192.168.168.213:8888
Content-Type: application/x-www-form-urlencoded
action=SetRewriteTel&name=testapi.bt.local&data=rewrite ^/old$ /new permanent;
响应
{"status": true, "msg": "已保存URL重写规则到模板!"}