Hi, I have problems solving below case:
All our files that are uploaded to our server are copied to an AWS s3 bucket automatically. This is a repeating process.
We want to delete the original files and rewrite the original urls in the generated html files hosted by nginx
original URL: https://localhost.com/images/sg_profilepics/949/56_output.jpg?t=-62169984000
to be replaced with: http://s3-bucket.aws.domain.com/images/sg_profilepics/949/56_output.jpg?t=-62169984000
1) How to capture the location?
2) How to rewrite the URL's?
3) Can we make the rewrite transparent to the users so they are not aware of the redirect to amazon?
Hope somebody can help because I tried everything but I cant seem to get it working... :-(