In general, the question is: How to mask external download links as internal links and to be only accessible by logged-in wp users at htaccess level or with PHP script? We have Perl based script at our external URL and its generating different download URLs. If you help how can we apply it on an external site we can do so.
We successfully redirect www.ourwebsite.com/resources
to external download link by simple htaccess code:
Redirect 301 /resources https://external.com/direct-download-link1
However, if the URLs (www.ourwebsite.com/resources/download-1.html etc.) are scraped by WordPress members and share & paste into their browser address bars when they don't log in then the download links are still accessible. We want to prevent it. So how to disallow non-members from accessing download links directly?