View internal redirect configuration
| Name | Description |
|---|---|
*domain-nameString | the domain whoes need query config |
| Name | Description |
|---|---|
domain-nameString | the domain whoes need query config |
domain-idString | the domain whoes need query config |
rewrite-rule-settingsList | |
after-valueString | Configuration item: new url Indicates the protocol method after rewriting, such as: 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 | Region |
ignore-letter-caseString | Ignore case, the optional value is true or false, true means to ignore case; false means not to ignore case; When adding a new configuration item, the default is not true. If the client passes a null value: such as <ignore-letter-case></ignore-letter-case>, the configuration is cleared. |
exceptional-operators-areaString | Exceptional region |
exceptional-requestString | Exceptional Request Method |
path-patternString | The url matching mode supports fuzzy regularization. If all matches, the input parameters can be configured as: |
custom-patternString | Matching conditions: specify common types, optional values are all or homepage 1. all: all files 2. homepage: home page |
request-wayString | Request Method |
priorityString | Indicates the priority execution order of multiple sets of redirected content by the customer. The higher the number, the higher the priority. When adding a new configuration item, the default is 10 |
uaString | UA |
directoryString | directory |
rewrite-typeString | Redirection type; support for input: before: before the anti-theft chain after: after the anti-theft chain |
publish-typeString | Rewrite the location where the content is generated. The input value is: Cache indicates the node; Other input formats are not supported at this time |
exception-request-headerString | Matching condition: Exception request header |
exceptional-uaString | Exceptional UA |
request-headerString | Matching condition: Request header |
data-idString | Add a grid type identifier to indicate a specific group configuration when the client has multiple groups of configurations. |
except-path-patternString | Exceptional url matching mode, except for certain URLs: such as abc.jpg, no content redirection Customer reference: ^https?://[^/]+/.*.m3u8 |
before-valueString | Configuration item: old url Indicates the protocol mode before rewriting (that is, the object that needs to be rewritten), such as: ^https://([^/]+/.*) |
| Error code(code) | Description(message) | HTTP status | Semantic |
|---|---|---|---|
| NoSuchDomain | The specified domain does not exist. | 404 | The specified domain does not exist. |
| CustomerNoOwnDomain | customer not own domain name[xxx] | 400 | customer not own domain name[xxx] |
| WRONG_OPERATOR | The operator does not exist | 400 | The operator does not exist |
| WRONG_CUSTOMER_NAME | Customer name error | 400 | Customer name error |
| WRONG_CUSTOMER_ID | Customer id error | 400 | Customer id error |
#!/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":""
}
]
}