Upload protected.php to root of WordPress website. The redirection rules is where all of the magic happens. With WP Engine use the following to target any file uploading in the media library with the -protected in the file name.
For example /wp-content/uploads/2016/08/logo**-protected**.jpg with be redirected to /protected.php?file=/2016/08/logo-protected.jpg.