Skip to content

Instantly share code, notes, and snippets.

@themightymo
Last active October 23, 2020 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save themightymo/ccefb4c75a78d764bbff34d61a56143a to your computer and use it in GitHub Desktop.
Save themightymo/ccefb4c75a78d764bbff34d61a56143a to your computer and use it in GitHub Desktop.
Redirect WordPress "uploads" folder to S3 bucket via .htaccess
# BEGIN Utilize S3 bucket rather than localhost for "uploads" folder - Via https://tinyurl.com/s3redirect
RewriteRule ^wp-content/uploads/(.*)$ https://your_bucket_name.s3.amazonaws.com/wp-content/uploads/$1 [R,L]
# END Utilize S3 bucket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment