Skip to main content
Known Participant
February 2, 2010
Question

Is it possible to password-protect the contents of a web folder in CF 8?

  • February 2, 2010
  • 1 reply
  • 657 views

I am using Dreamweaver CS4 with CF 8.  I can protect web pages by building a database with usernames and passwords, but this does not protect other files (docs, pdfs, etc) from access. Other than an htaccess file, is there any way to password protect the entire contents of a webfolder in ColdFusion? Are there any extensions that do this?  This is all new to me.

Thanks

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    February 2, 2010

    You are not able to do this with CF directly.  It would be a function of the web server.

    You could move all documents other than .cfm into a folder outside of the web root, then use tags such as cfcontent to deliver those files programatically (as often happens when you download software off of a website now days).  However I suspect this isn't what you are looking for.  Just in case here is a quick example of how you may do the force download of document from outside root:  http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/force-file-download-27

    Known Participant
    February 2, 2010

    Joshua,

    Sounds like a terrific solution. I'll try that.

    Thanks