jeudi 4 juin 2015

Wordpress Images URL Rewriting to AWS Cloudfront

I am trying to url rewrite all my wordpress wp-content/images to AWS Cloudfront.

I added this to my /var/www/html/.htaccess

Options +FollowSymlinks
RewriteEngine on
rewriterule ^wp-content/uploads/(.*)$ http://<cloud_front_domain_name>/$1 [r=301,nc]

I restarted the Apache but still nothing happens.

I am using EC2 Ubuntu

Note: I don't want to use W3 Total Cache because it is always looking at the /wp-content/uploads folder. I am currently using the root folder of the Amazon S3

For example:

W3 Total Cache

<cloud_front_domain_name>/wp-content/uploads/2015/06/banner_3.png

My set up it should point to

<cloud_front_domain_name>/2015/06/banner_3.png




Aucun commentaire:

Enregistrer un commentaire