forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
32 lines
6.9 KiB
HTML
32 lines
6.9 KiB
HTML
<a name="en-us_topic_0066088957"></a><a name="en-us_topic_0066088957"></a>
|
|
|
|
<h1 class="topictitle1">Configuring Redirection</h1>
|
|
<div id="body1499758606807"><p id="en-us_topic_0066088957__p30121176153913">You can redirect all requests for a bucket to another bucket or URL by configuring redirection rules.</p>
|
|
<div class="section" id="en-us_topic_0066088957__section6167532661"><h4 class="sectiontitle">Prerequisites</h4><p id="en-us_topic_0066088957__en-us_topic_0045853755_p1146611514350">Web page files required for static website hosting have been uploaded to the specified bucket.</p>
|
|
<p id="en-us_topic_0066088957__en-us_topic_0045853755_p1812645682117">The static website files hosted in the bucket are accessible to anonymous users.</p>
|
|
<p id="en-us_topic_0066088957__en-us_topic_0045853755_p3350182614313">Static web page files in the Cold storage class have been restored. For more information, see <a href="obs_03_0320.html">Restoring an Object from Cold Storage</a>.</p>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0066088957__section11587693153957"><h4 class="sectiontitle">Procedure</h4><ol id="en-us_topic_0066088957__ol44271394154014"><li id="en-us_topic_0066088957__li99821455306"><span>In the bucket list, click the bucket you want to operate. The <strong id="en-us_topic_0066088957__obs_03_0307_b144421021120">Overview</strong> page is displayed.</span></li><li id="en-us_topic_0066088957__li18830181855820"><span>In the <strong id="en-us_topic_0066088957__b105231578574">Basic Configurations</strong> area, click <strong id="en-us_topic_0066088957__b19523117125713">Static Website Hosting</strong>. The <strong id="en-us_topic_0066088957__b852320795717">Static Website Hosting</strong> page is displayed.</span><p><p id="en-us_topic_0066088957__p1732877134316">Alternatively, you can choose <strong id="en-us_topic_0066088957__b5238144012014">Basic Configurations</strong> > <strong id="en-us_topic_0066088957__b1024004072014">Static Website Hosting</strong> from the navigation pane on the left.</p>
|
|
</p></li><li id="en-us_topic_0066088957__li720344934317"><span>Click <strong id="en-us_topic_0066088957__b2757173664816">Configure Static Website Hosting</strong>. The <strong id="en-us_topic_0066088957__b3757143664814">Configure Static Website Hosting</strong> dialog box is displayed.</span></li><li id="en-us_topic_0066088957__li16729105453"><span>Enable <strong id="en-us_topic_0066088957__b14179153622818">Status</strong>.</span></li><li id="en-us_topic_0066088957__li265648184614"><span>Set <strong id="en-us_topic_0066088957__b23336411105">Hosting By</strong> to <strong id="en-us_topic_0066088957__b571910302110">Redirection</strong>, as shown in <a href="#en-us_topic_0066088957__fig965144815468">Figure 1</a>. In the text box of <strong id="en-us_topic_0066088957__b137976411110">Redirect To</strong>, enter the bucket's access domain name or URL.</span><p><div class="fignone" id="en-us_topic_0066088957__fig965144815468"><a name="en-us_topic_0066088957__fig965144815468"></a><a name="fig965144815468"></a><span class="figcap"><b>Figure 1 </b>Configuring redirection</span><br><span><img id="en-us_topic_0066088957__image146644814611" src="en-us_image_0000001801955289.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
</p></li><li id="en-us_topic_0066088957__li48239657155648"><span>Click <strong id="en-us_topic_0066088957__b36028660">OK</strong>.</span></li><li id="en-us_topic_0066088957__li21017577482"><span>In the bucket list, click the bucket to which requests for the static website are redirected.</span></li><li id="en-us_topic_0066088957__li45818654181751"><span>(<strong id="en-us_topic_0066088957__en-us_topic_0045853755_b7869135132012">Optional</strong>) If the static website files in the bucket are not accessible to anonymous users, perform this step. If they are already accessible to everyone, skip this step.</span><p><p id="en-us_topic_0066088957__en-us_topic_0045853755_p18712161416268">Grant the read permission for static website files to anonymous users. For details, see <a href="obs_03_0132.html">Granting Anonymous Users Permission to Access Objects</a>.</p>
|
|
<p id="en-us_topic_0066088957__en-us_topic_0045853755_p14415184985410">If the bucket contains only static website files, configure the <strong id="en-us_topic_0066088957__en-us_topic_0045853755_b1273611558518">Public Read</strong> policy for the bucket so that all files in it are publicly accessible.</p>
|
|
<ol type="a" id="en-us_topic_0066088957__en-us_topic_0045853755_ol56026477144312"><li id="en-us_topic_0066088957__en-us_topic_0045853755_li26219314144346">Choose <strong id="en-us_topic_0066088957__en-us_topic_0045853755_b1966141115407">Permissions</strong> > <strong id="en-us_topic_0066088957__en-us_topic_0045853755_b7671191919400">Bucket Policies</strong>.</li><li id="en-us_topic_0066088957__en-us_topic_0045853755_li820711719166">In the <strong id="en-us_topic_0066088957__en-us_topic_0045853755_b137091459121110">Standard Bucket Policies</strong> area, select the <strong id="en-us_topic_0066088957__en-us_topic_0045853755_b8285215161211">Public Read</strong> policy for the bucket.</li><li id="en-us_topic_0066088957__en-us_topic_0045853755_li588503161565">Click <strong id="en-us_topic_0066088957__en-us_topic_0045853755_b9882162941218">Public Read</strong>. For details, see <a href="#en-us_topic_0066088957__en-us_topic_0045853755_fig15186794193556">Figure 2</a>. In the confirmation dialog box that is displayed, click <strong id="en-us_topic_0066088957__en-us_topic_0045853755_b1842219132">Yes</strong>.<div class="fignone" id="en-us_topic_0066088957__en-us_topic_0045853755_fig15186794193556"><a name="en-us_topic_0066088957__en-us_topic_0045853755_fig15186794193556"></a><a name="en-us_topic_0045853755_fig15186794193556"></a><span class="figcap"><b>Figure 2 </b>Configuring the public read permission</span><br><span><img id="en-us_topic_0066088957__en-us_topic_0045853755_image1956565091517" src="en-us_image_0129612765.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
</li></ol>
|
|
</p></li><li id="en-us_topic_0066088957__li19484318154414"><span><strong id="en-us_topic_0066088957__b862293812442">Verification</strong>: Input the access domain name of the bucket in the web browser and press <strong id="en-us_topic_0066088957__b9751164710445">Enter</strong>. The bucket or URL to which requests are redirected will be displayed.</span><p><div class="note" id="en-us_topic_0066088957__note41738653155935"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="en-us_topic_0066088957__p25433685155943">In some conditions, you may need to clear the browser cache before the expected results are displayed.</p>
|
|
</div></div>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0336.html">Static Website Hosting</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
image_size('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |