URL Forwarding pattern


I am trying to forward


So I have wrriten


Because I would like the forwarding to be dynamic as anything after the first url wp-content i would like to come onto the end of the last url wp-content.

Would this work?


I can’t imagine that would go well. That’s where your plugins and theme files go. I see you’ve already tried it and AWS is blocking it.

Is there a reason you’re trying to use an S3 bucket as a CDN instead of Amazon CloudFront? Besides, Cloudflare will cache the static resources in wp-content by default.

I’m trying to offload my media uploads to s3 and am using a plugin called media offload s3 lite which automatically links it to a bucket and rewrites to URL in wordpress. This works good on the front end however when you use page builders like DIVI that depend on the local resource location which causes problems like images not loading. I thought that by creating a redirect to the original file to the amazon one the plugin might be able to find the file and load it. It’s more of testing as I need to try to resolve this issue.

Also, the plugin deletes the files of the server once uploaded to amazon s3. There are many benefits using S3 over the default server. S3 buckets are cheaper on space and it makes the server faster as it takes to load off the server in terms of serving the content.

To answer your question from a Cloudflare perspective, the forwarder will forward those requests as written. Now it’s just up to you to get WordPress and S3 to play nicely together.

This topic was automatically closed after 14 days. New replies are no longer allowed.