Is there any way to restrict the downloading of files within a subfolder using special .htaccess rules?

We have a bunch of client files sitting in a "uploads" folder on our Apache-based site. Although the directory itself is NOT browseable (403 forbidden - Directory Listing not allowed) ... the client has become concerned that the files themselves might be compromised somehow, .. or indexed by search engines.

Is there any way that we can apply special .htaccess rules to that uploads folder so that the files contained within it can only be downloaded using a PHP script (or something like that)? We're just looking for a way to secure those files somehow -- without having to reprogram the site so that the file uploads are stored and served up from outside the site root. Please advise.

For the most safety, move the directory outside of the WWW root. But that said, if your server returns a 403 forbidden to browsers, you are also returning a 403 forbidden to search engines. No compromise

For the most safety, move the directory outside of the WWW root. But that said, if your server returns a 403 forbidden to browsers, you are also returning a 403 forbidden to search engines. No compromise is likely at all since you're not sending the data -- just the "forbidden" headers.

Featured Post

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

SSH (Secure Shell) - Tips and Tricks
As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…

I. Introduction
There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…