Password Protect .html

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Password Protect .html

    Hello,

    I am using application.cfm to password protect all my files in a given
    directory on our server. However, there are a series of html pages that are
    generated into the directory that i would also like to protect. Is there a way
    to do this with the application.cfm? Or is there a way for me to have the html
    pages' extension changed to .cfm automatically somehow? Any help would be
    appreciated.

    Thanks,
    Frank

    fshin Guest

  2. Similar Questions and Discussions

    1. Using ASP to password protect a webpage
      I recently tried to setup a password protected part of my website. I went to microsoft.com and there were instructions on how to use ASP to...
    2. password protect .fla file ?
      Hi all Is there a way for me to password protect my .fla and .swf files ? So that ? say someone comes up to my desktop, and is prompted for a...
    3. protect password without SSL
      hi all, i have a problem with my asp.net web application. i'd like to protect passwords users sent to server, without using SSL server. i'm not...
    4. Password Protect
      I am trying to password protect the partitions on my harddrive. I created 3 partions the 4th one being used only for the OS. Is there a way to...
    5. Password protect IE
      "David Houghton" <d.j.houghton@talk21.com> wrote in message news:<eQgCjSLODHA.2052@TK2MSFTNGP11.phx.gbl>......
  3. #2

    Default Re: Password Protect .html

    have you thought of using <cffile action="rename"> for the html files that are generated?
    adonis1976 Guest

  4. #3

    Default Re: Password Protect .html

    On 2005-05-05 12:21:47 -0500, "fshin" <webforumsuser@macromedia.com> said:
    > Hello,
    >
    > I am using application.cfm to password protect all my files in a given
    > directory on our server. However, there are a series of html pages
    > that are generated into the directory that i would also like to
    > protect. Is there a way to do this with the application.cfm? Or is
    > there a way for me to have the html pages' extension changed to .cfm
    > automatically somehow? Any help would be appreciated.
    Off the top of my head, unless you add a mapping so that .html files
    get processed by the CF server, I don't think there's any way to use CF
    to protect your HTML files since CF wouldn't be processing them (and
    hence wouldn't know or care about the HTML files). Probably the
    simplest thing to do is just change the file extension of your HTML
    pages to cfm.

    Matt

    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  5. #4

    Default Re: Password Protect .html

    Well, these pages are actually just generated by Microsoft Access and are
    manually exported by someone into the web server directory. There may be 30
    pages put in there at a time. Can I use cffile to automatically rename these
    files (just the extension, not the actual filename)?

    fshin Guest

  6. #5

    Default Re: Password Protect .html

    Matt,

    How do I do this mapping? Is there a downside to doing this? Also, it would be very tedious to change the extensions manually as there will be approximately 30 new pages per day.

    Frank
    fshin Guest

  7. #6

    Default Re: Password Protect .html

    lets assume that ur user is uploading the html files to the folder "temp"
    then i would do create this code:
    <cfdirectory directory="#expandpath(temp)#" name="qFolder">
    <cfset sFolderPath = expandPath(temp)>
    <cfloop query="qFolder">
    <cffile action="rename" source="#sFolderPath#\#name#"
    destination="#sFolderPath#\replaceNoCase("#name#", 'html','cfm',"all")">
    </cfloop>

    Schedule this file to run of the CF administrator..let me know.

    adonis1976 Guest

  8. #7

    Default Re: Password Protect .html

    On 2005-05-05 13:02:31 -0500, "fshin" <webforumsuser@macromedia.com> said:
    > Matt,
    >
    > How do I do this mapping? Is there a downside to doing this? Also, it
    > would be very tedious to change the extensions manually as there will
    > be approximately 30 new pages per day.
    >
    > Frank
    There's an explanation here--this is something you do in the web server:
    [url]http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_21056883.html[/url]

    Basically you just tell IIS to use CF to process files with .html
    extensions (or whatever your extension happens to be). The downside is
    that this will mean *all* of your HTML files get processed by the CF
    server, which means a small performance hit vs. serving HTML directly.
    Probably won't be a showstopper but it is defintely something to be
    aware of.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* 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