/assets - file1.mp3 - file2.mp3 ... - fileX.mp3
(millions of files)
So what I want to prevent is to access the content directly if the user is not logged in like http://domain.com/assets/file1.mp3
Ideally the URL to the asset file will be changing every time a user logs in, using his session something like http://domain.com/assets/51303ca30479c7a79b75373a/file1.mp3
how to enforce it? so the goal - is to change the URLs often and before redirecting to actual binary file.
I understand I can do something like this
RewriteRule ^(.*\.mp3)$ /path/to/auth.php?i=$1
But I prefer not to use PHP to process the auth. Is there an elegant way with apache to process this issue?