DDoS云清洗

查看域名内部重定向配置

更新时间:2026-07-29 10:52:57

查看内部重定向配置

  • 限制说明:· 加速域名必须已备案完成。 · 加速域名必须不包含如下信息:出售药物和管制刀具类,含有不法言论、信息。 · 视频类加速域名必须有视听许可证;博客论坛或社区类加速域名必须有BBS专项审批资质。 · 接口请求和返回结果接受xml和json格式。
  • 单用户调用频率:300/5min
  • 适用产品:动态加速、流媒体点播、互动直播、静态加速、DDoS云清洗、DDoS云清洗 2.0
API鉴权说明详见:API鉴权概览

请求参数

Path 参数

参数名称描述
*domain-nameString

需要查询配置的域名或域名id

返回参数

Body 参数

参数名称描述
domain-nameString

需要查询配置的域名

domain-idString

需要查询配置的域名id

rewrite-rule-settingsList
after-valueString

配置项:新url 表示改写后的协议方式,如:http://$1

file-typeString

匹配条件:文件类型,多个请以英文;分隔,可选值:gif png bmp jpeg jpg html htm shtml mp3 wma flv mp4 wmv zip exe rar css txt ico js swf m3u8 xml f4m bootstarp ts

operators-areaString

用户区域

ignore-letter-caseString

忽略大小写,可选值为true或false,true表示忽略大小写;false表示不忽略大小写; 新增配置项时,不传默认为 true 如果客户传了空值:如<ignore-letter-case></ignore-letter-case>,则表示清空配置

exceptional-operators-areaString

例外的用户区域

exceptional-requestString

例外的请求方式

path-patternString

url匹配模式,支持正则, .:匹配所有文件 客户入参参考:. 对于匹配到的URL进行内容重定向

custom-patternString

匹配条件:指定常用类型,可选值为all或homepage 1、all:全部文件 2、homepage:首页

request-wayString

请求方式

priorityString

表示客户多组重定向内容的优先执行顺序。数字越大,优先级越高。 新增配置项时,不传默认为 10

uaString

UA

directoryString

目录

rewrite-typeString

重定向类型;支持入参: before:防盗链之前 after:防盗链之后

publish-typeString

改写内容的生成位置。可输入值为:Cache表示节点; 暂不支持其他入参格式

exception-request-headerString

匹配条件:例外的请求头

exceptional-uaString

例外的UA

request-headerString

匹配条件:请求头

data-idString

添加grid类型标识,表示客户多组配置时,具体某组配置;data-id重复,已入参同个id最后一组为准生效

except-path-patternString

例外的url匹配模式,某些URL除外:如abc.jpg,不做内容重定向 客户入参参考:^https?://[^/]+/.*.m3u8

before-valueString

配置项:旧url 表示改写前的协议方式(即需要改写的对象),如:^https://([^/]+/.*)

错误码

错误代码(code)描述(message)HTTP状态码语义
NoSuchDomain

The specified domain does not exist.

404域名不存在
CustomerNoOwnDomain

customer not own domain name[xxx]

400客户没有该域名
WRONG_OPERATOR

The operator does not exist

400操作员不存在
WRONG_CUSTOMER_NAME

Customer name error

400客户名称错误
WRONG_CUSTOMER_ID

Customer id error

400客户ID错误

示例

JSON
XML
JSON
请求示例
复制代码 复制成功
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://{@apiDomain}/api/config/InnerRedirect/a1.example.com" \
-X "GET" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json"
-H "Content-Type:application/json"
返回示例
复制代码 复制成功
HTTP/1.1 202 Accepted
Date: Fri, 17 May 2017 06:33:26 GMT
Content-Type: application/json;charset=utf-8
x-cnc-request-id:c54cbbb4-19fe-407a-930c-3988b62ed2fd
{
    "domain-id":"3797820",
    "domain-name":"www.web.1558604466417332.com",
    "rewrite-rule-settings":[
      {
        "after-value":"https://$1",
        "before-value":"^http://([^/]+/.*)",
        "data-id":31506537,
        "except-path-pattern":"^https?://[^/]+/.*.m3u8",
        "ignore-letter-case":"true",
        "path-pattern":".*",
        "priority":"10",
        "publish-type":"Cache",
        "rewrite-type":"before",
        "request-way":"POST;DELETE",
        "exceptional-request":"Purge",
        "ua":"(Mac|iPhone|iPad)",
        "exceptional-ua":"iPad",
        "operators-area":"Asia_East",
        "exceptional-operators-area":"Asia_South"
      },
      {
        "after-value":"https",
        "before-value":"http",
        "data-id":31506539,
        "except-path-pattern":"^https?://[^/]+/.*.m3u8",
        "ignore-letter-case":"true",
        "path-pattern":".*",
        "priority":"9",
        "publish-type":"Cache",
        "rewrite-type":"before",
        "request-way":"",
        "exceptional-request":"",
        "ua":"",
        "exceptional-ua":"",
        "operators-area":"",
        "exceptional-operators-area":""
      }
    ]
  }
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!