I don’t have a problem protecting the file from direct access. The issue is that a user without permission to access the file results in a “file not found” error when the file actually does exist. I want to ensure that the user is given useful information or is redirected to another page rather than an error.
Would the Block Hotlink add-on do what I need?