Restricting access to a directory of pdf's

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default Restricting access to a directory of pdf's

    I want to restrict access to a directory that contains pdf's.

    So lets say i have

    /publicpdfs/
    /memberpdfs/

    public are free for all, members are available once you are logged in. I want
    to be able to link to the pdf's (preferably directly), but I need a way to
    make sure the user has logged in first. Since I am assuming application.cfm
    wont run when loading a pdf, how can I check to make sure the user is logged in?

    (besides password protecting the directrory in IIS)

    jgladnick Guest

  2. Similar Questions and Discussions

    1. Restricting Access to CFX
      I was looking into implementing some of the resources of the IHTK toolkit on a web development project I am working on. The tools that are in the...
    2. Restricting access
      Hello, I am trying to creat one page within my site that one certain people can see (need a username and password to access) so car reading the...
    3. restricting access to log-file
      A short and hopefully simple question: I'm using log4net to log to a text file. The text file is located in the root of my webapplikation. How do I...
    4. Restricting telnet access to user's home directory
      On Sat, 8 Mar 2003, Troy Matteoli wrote: I try to limit telnet access to my BBS users here.
    5. Restricting user to a directory with vsftpd
      Is it possible to restrict all users (I am not using anonymous) to their directory and those below? In reading the docs, I am not sure how this...
  3. #2

    Default Re: Restricting access to a directory of pdf's

    The best way, in my opinion, is to use cfcontent.

    It won't get you exactly what you want (when you say you'd prefer to link
    directly to the pdfs), but it will ensure that users are logged in first.

    Make a page, viewpdf.cfm, that you access as follows:
    [url]http://www.example.com/viewpdf.cfm?pdf=protectedpdf.pdf[/url]

    Then in viewpdf.cfm, you first ensure that they have rights to access the PDF
    file, then you do a cfcontent call that includes the
    /memberpdfs/protectedpdf.pdf file.

    Kronin555 Guest

  4. #3

    Default Re: Restricting access to a directory of pdf's

    That actually might work, thanks!
    jgladnick Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139