Professional Web Applications Themes

Password Protect .html - Coldfusion - Advanced Techniques

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...

  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. #2

    Default Re: Password Protect .html

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

  3. #3

    Default Re: Password Protect .html

    On 2005-05-05 12:21:47 -0500, "fshin" <webforumsusermacromedia.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[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  4. #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

  5. #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

  6. #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

  7. #7

    Default Re: Password Protect .html

    On 2005-05-05 13:02:31 -0500, "fshin" <webforumsusermacromedia.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[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

Similar Threads

  1. How to password protect a page?
    By Swan Teacher in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 1
    Last Post: January 17th, 10:52 PM
  2. password protect .fla file ?
    By dillontdaniel webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 3
    Last Post: September 27th, 01:35 AM
  3. protect password without SSL
    By viviana in forum ASP.NET Security
    Replies: 1
    Last Post: July 31st, 07:14 PM
  4. Password Protect
    By Scott M Harris in forum Windows Setup, Administration & Security
    Replies: 0
    Last Post: July 14th, 02:41 PM
  5. Password protect IE
    By cuijiu in forum Windows Setup, Administration & Security
    Replies: 0
    Last Post: June 29th, 07:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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