I want to restrict our external direct download links inside of wordpress site to only wp logged in users when they are outside of wp. I have both wp site and external site root access. How can i achieve this goal? What is the proper way to do it?
I have both access to two linux servers , php 7.2 wordpress and other has another script.
For example:
example.com/video/imgt/a/b/e/n/c/870520.720.mp4?s=YmgTjut5WaevChEEY7IqdA&ts=1553564655
on another website it adds hash like ?s=YmgTjut5WaevChEEY7IqdA&ts=1553564655
to the end of mp4 file and nobody can access it outside of the owner site.
When user clicks on the link the url must require him to login to wordpress site before download.