.htaccess protect .txt files <--can scripts still access

Discussion in 'HTML & Website Design' started by SupaSharp, Oct 9, 2007.

  1. #1
    I have several PHP scripts on my site that output data to a .txt files. I need to limit access to those files using .htaccess.

    If I added this:
    # prevent site fingerprinting via release related files
    <FilesMatch "(^mytext1|mytext2|mytext3|mytext4).*\.txt$">
      Order deny,allow
      Deny from all
    </FilesMatch>
    PHP:
    Would my php script still be able to write to these text files?
     
    SupaSharp, Oct 9, 2007 IP
  2. norfstar

    norfstar Peon

    Messages:
    1,154
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yes, PHP scripts (on the same server) will still be able to access files.
     
    norfstar, Oct 9, 2007 IP
  3. SupaSharp

    SupaSharp Well-Known Member

    Messages:
    1,865
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    100
    #3
    Perfect, thanks!
     
    SupaSharp, Oct 9, 2007 IP