GET /?website HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth String
<WebsiteConfiguration><IndexDocument><Suffix>string</Suffix></IndexDocument><RedirectAllRequestsTo><Protocol>string</Protocol></RedirectAllRequestsTo><ErrorDocument><Key>string</Key></ErrorDocument><RoutingRules><RoutingRule><Condition><HttpErrorCodeReturnedEquals>integer</HttpErrorCodeReturnedEquals></Condition><Redirect><Protocol>string</Protocol><ReplaceKeyWith>string</ReplaceKeyWith></Redirect></RoutingRule><RoutingRule><Condition><KeyPrefixEquals>string</KeyPrefixEquals></Condition><Redirect><Protocol>string</Protocol><ReplaceKeyPrefixWith>string</ReplaceKeyPrefixWith></Redirect></RoutingRule></RoutingRules></WebsiteConfiguration>
节点名称(关键字) | 父节点 | 描述 | 类型 |
WebsiteConfiguration | 无 | 保存 GET Bucket website 结果的所有信息 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
IndexDocument | WebsiteConfiguration | 索引文档配置 | Container |
RedirectAllRequestsTo | WebsiteConfiguration | 重定向所有请求配置 | Container |
ErrorDocument | WebsiteConfiguration | 错误文档配置 | Container |
RoutingRules | WebsiteConfiguration | 重定向规则配置 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Suffix | WebsiteConfiguration.IndexDocument | 指定索引文档的对象键后缀。例如指定为 index.html ,那么当访问到存储桶的根目录时,会自动返回 index.html 的内容,或者当访问到article/ 目录时,会自动返回article/index.html 的内容 | string |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Protocol | WebsiteConfiguration.RedirectAllRequestsTo | 指定重定向所有请求的目标协议 | string |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Key | WebsiteConfiguration.ErrorDocument | 指定通用错误文档的对象键 | string |
节点名称(关键字) | 父节点 | 描述 | 类型 |
RoutingRule | WebsiteConfiguration.RoutingRules | 单条重定向规则配置 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Condition | WebsiteConfiguration.RoutingRules.RoutingRule | 重定向规则的条件配置 | Container |
Redirect | WebsiteConfiguration.RoutingRules.RoutingRule | 重定向规则的具体重定向目标配置 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
HttpErrorCodeReturnedEquals | WebsiteConfiguration.RoutingRules.RoutingRule.Condition | 指定重定向规则的错误码匹配条件 | integer |
KeyPrefixEquals | WebsiteConfiguration.RoutingRules.RoutingRule.Condition | 指定重定向规则的对象键前缀匹配条件 | string |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Protocol | WebsiteConfiguration.RoutingRules.RoutingRule.Redirect | 指定重定向规则的目标协议 | string |
ReplaceKeyWith | WebsiteConfiguration.RoutingRules.RoutingRule.Redirect | 指定重定向规则的具体重定向目标的对象键,替换方式为替换整个原始请求的对象键 | string |
ReplaceKeyPrefixWith | WebsiteConfiguration.RoutingRules.RoutingRule.Redirect | 指定重定向规则的具体重定向目标的对象键,替换方式为替换原始请求中所匹配到的前缀部分 | string |
GET /?website HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 20 May 2020 09:33:49 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1589967229;1589974429&q-key-time=1589967229;1589974429&q-header-list=date;host&q-url-param-list=website&q-signature=50a22a30b02b59e5da4a0820d15a36805ea7****Connection: close
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 1163Connection: closeDate: Wed, 20 May 2020 09:33:49 GMTServer: tencent-cosx-cos-request-id: NWVjNGY5N2RfYTdjMjJhMDlfNjZkY18yYWUx****<WebsiteConfiguration><IndexDocument><Suffix>index.html</Suffix></IndexDocument><RedirectAllRequestsTo><Protocol>https</Protocol></RedirectAllRequestsTo><ErrorDocument><Key>pages/error.html</Key></ErrorDocument><RoutingRules><RoutingRule><Condition><HttpErrorCodeReturnedEquals>403</HttpErrorCodeReturnedEquals></Condition><Redirect><Protocol>https</Protocol><ReplaceKeyWith>pages/403.html</ReplaceKeyWith></Redirect></RoutingRule><RoutingRule><Condition><HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals></Condition><Redirect><ReplaceKeyWith>pages/404.html</ReplaceKeyWith></Redirect></RoutingRule><RoutingRule><Condition><KeyPrefixEquals>assets/</KeyPrefixEquals></Condition><Redirect><ReplaceKeyWith>index.html</ReplaceKeyWith></Redirect></RoutingRule><RoutingRule><Condition><KeyPrefixEquals>article/</KeyPrefixEquals></Condition><Redirect><Protocol>https</Protocol><ReplaceKeyPrefixWith>archived/</ReplaceKeyPrefixWith></Redirect></RoutingRule></RoutingRules></WebsiteConfiguration>
本页内容是否解决了您的问题?