I have this self-hosted temporary file hosting system that, after file upload, produces a download URL.
When you visit the download page, a file or files will be downloaded with a direct link to:
The 12 characters after
site.com/direct/ are always the same 12 characters from the download page.
Now I want to forbid downloading the files directly and require that a user always use the download page.
Basically, I want to redirect the direct download link if it’s accessed directly or referred from another site to its own download page (site.com/
I already tried the rewrite rules, but I cannot figure out how to strip out the extra characters after the unique first 12 characters and also the /direct/ URI.
Thanks for the help.