GET Bucket Website

You can perform this operation to get the website configuration of a bucket.

Only users granted the s3:GetBucketWebsite permission can get the bucket website configuration. By default, only the bucket owner can get the bucket website configuration. The bucket owner can allow other users to get the bucket website configuration by granting them the permission.

Request Syntax

GET /?website HTTP/1.1
Host: bucketname.obs.cn-north-1.myhwclouds.com
Date: date
Authorization: authorization

Request Parameters

This request contains no parameter.

Request Headers

This request uses common headers. For details, see Common Request Headers.

Request Elements

This request contains no element.

Response Syntax

HTTP/1.1 status_code
Date: date
Content-Type: type
Content-Length: length
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<WebsiteConfiguration xmlns="http://obs.cn-north-1.myhwclouds.com/doc/2015-06-30/">
    <RedirectAllRequestsTo>
        <HostName>hostName</HostName>
    </RedirectAllRequestsTo>
</WebsiteConfiguration>

Response Headers

This response uses common headers. For details, see Common Response Headers.

Response Elements

This response contains the same elements as those used by the PUT Bucket Website request. For details, see Request Elements.

Error Responses

This response may contain one special error, as described in Table 1.

Table 1 Special error

Error Code

Description

HTTP Status Code

NoSuchWebsiteConfiguration

Indicates that the website configuration does not exist.

404 Not Found

For other errors, see Table 1.

Registration