Rewrite CNAME URLs to https://s3.amazonaws.com?
-
I’ve been using this plugin successfully since the TanTan days. I didn’t want to have Amazon links in my HTML, so I set up a CNAME assets.example.com and pointed that at my S3 bucket.
Now I want to switch my site to https, and I’m trying to re-write the URLs so that
https://assets.example.com/wp-content/uploads/image.jpg
changes to:
https://s3.amazonaws.com/assets.example.com/wp-content/uploads/image.jpg
which is the same file served securely.I’ve tried putting the following in htaccess, just after RewriteEngine On
RewriteCond %{HTTP_HOST} ^assets.example.com$ [NC]
RewriteRule ^(.*)$ https://s3.amazonaws.com/assets.example.com/%{REQUEST_URI} [R=301,NC,L,QSA]but it doesn’t work. Have I made a mistake or am I trying something impossible?
Sorry if this is seen as off-topic, but there must be many other users of this plugin in a similar situation to me.
- The topic ‘Rewrite CNAME URLs to https://s3.amazonaws.com?’ is closed to new replies.