htaccess从Amazon AWS提供图像

时间:2018-06-23 18:29:40

标签: .htaccess amazon-web-services

我无法使用它。

我需要使用htaccess在AWS上提供图像,就像它们在我的网站上一样。

示例:http://www.example1.com/images/meme.jpg
应该显示来自的图片 https://bucket1.s3-us-west-1.amazonaws.com/meme.jpg 但这不是重定向。该地址在浏览器中仍显示为http://www.example1.com/images/meme.jpg

一个同事正在使用这个:

RewriteEngine On
RewriteRule ^images/(.*)$ http://bucket1.s3-us-west-1.amazonaws.com/$1 [P]

但是,当我这样做时,我得到了:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>NoSuchBucket</Code>
<Message>The specified bucket does not exist</Message>
<BucketName>www.example1.com</BucketName>
<RequestId>4CE66A21A22EC3CA</RequestId>
<HostId>
BlAEYrdEO+xm4fGSwjyeZX/pn7IVfHPNGiLJpWRta/PNxekFnLuXHnbX2EGjkIdY2gVM65E2ymI=
</HostId>
</Error>

为什么它似乎将我的域用作存储桶名称???为此我扯掉头发。

0 个答案:

没有答案
相关问题