For many years, I have been using Randall Schwartz's script to password protect an area of our organization's website. Recently, members have requested that we post links to PDF files that are confidential for member's eyes only. But, obviously, if I just put the link to the file into one of our protected pages, there's nothing to stop someone from sending that link to a nonmember who can access the file by pasting the URL into a browser. I would like members to be able to access the file if their logged in, and not require them to enter another password to unlock the file (ie by password-protecting the file). Can anyone suggest a way for me to check that a member is logged in before loading the file, and redirecting the login page if they aren't logged in? I'm worried about creating a self-referring loop. Thanks, Janaki

In reply to Protecting a PDF file by jck

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.