title: Redirect wordpress uploads folder to s3 bucket using .htaccess
body: <p>I'm trying to redirect my uploads folder to my s3 bucket using htaccess in wordpress however it's not working. All the images on my site are still getting served locally from the server instead of linking to the bucket.</p>
  
  <p>This is my htaccess file:</p>
  
  <pre><code># BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  
  # END WordPress
  
  RewriteEngine On
  RewriteRule ^wp-content/uploads/(.*)$ https://BUCKET.s3.amazonaws.com/wp-content/uploads/$1 [L]
  
  # BEGIN W3TC CDN
  &lt;FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$"&gt;
  &lt;IfModule mod_headers.c&gt;
      Header set Access-Control-Allow-Origin "*"
  &lt;/IfModule&gt;
  &lt;/FilesMatch&gt;
  # END W3TC CDN
  </code></pre>