我的計劃是使用一個Amazon Bucket執行301從www域到非www的重定向。域。將301重定向規則配置爲301重定向
我希望能夠指向任何URL到它,擁有它不僅表現在該域的重定向,但也保持directioy路徑:
www.site.com/test - > site.com /測試
重定向規則可以在這裏找到: http://docs.aws.amazon.com/AmazonS3/latest/dev/HowDoIWebsiteConfiguration.html
這是一般的設置是什麼樣子:
RoutingRules> =
<RoutingRules>
<RoutingRule>...</RoutingRule>
[<RoutingRule>...</RoutingRule>
...]
</RoutingRules>
<RoutingRule> =
<RoutingRule>
[ <Condition>...</Condition> ]
<Redirect>...</Redirect>
</RoutingRule>
<Condition> =
<Condition>
[ <KeyPrefixEquals>...</KeyPrefixEquals> ]
[ <HttpErrorCodeReturnedEquals>...</HttpErrorCodeReturnedEquals> ]
</Condition>
Note: <Condition> must has at least one child element.
<Redirect> =
<Redirect>
[ <HostName>...</HostName> ]
[ <Protocol>...</Protocol> ]
[ <ReplaceKeyPrefixWith>...</ReplaceKeyPrefixWith> ]
[ <ReplaceKeyWith>...</ReplaceKeyWith> ]
[ <HttpRedirectCode>...</HttpRedirectCode> ]
</Redirect>
Note: <Redirect> must has at least one child element.
Also, you can have either ReplaceKeyPrefix with or ReplaceKeyWith,
but not both.
我會把我的www CNAME指向這個桶。我的問題是,鑑於亞馬遜給我們的重定向控件,這可能嗎?