I have a products database and I'm currently defining filepath in the table and, after the user passes the security checks, I use
header("Location: . $filepath);
to send them the file. This sort of hides the url provided they aren't devious, curious or resourceful. I imagine there must be a .htaccess way to protect the directory the file is in but I wouldn't know how to use it, can anyone help?
Also, better suggestions on hiding the files url would be very welcome.