跳到主要内容
版本:latest

SetRewriteTel

将自定义 URL 重写(伪静态)规则保存为模板文件。

  • 路由POST /site
  • actionSetRewriteTel

输入参数

参数名称必选类型描述
actionString固定值 SetRewriteTel
nameString模板名称(不含路径和扩展名)
dataString重写规则内容

输出参数

参数名称类型描述
statusBooleantrue 保存成功
msgString已保存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重写规则到模板!"}