I have developed a website in Drupal 7. Right now I have a requirement: A page should display a PDF file (already generated). Only authenticated users should have access to view or download this file, but anyone with direct access to this static file link can view it and download it.
Is there any method I can use to prevent this and redirect them to the login page? What kind of logical programming needs to be applied in this case?