Apache Question

Discussion in 'PHP' started by redhits, Mar 4, 2008.

  1. #1
    there was a website like

    xxx.com/downlonds

    it was a folder with full of zips.

    now somebody can aded a file
    xxx.com/downloads/index.html


    my question is, can i still view the files from this directory if he put an index.html file?
     
    redhits, Mar 4, 2008 IP
  2. Vbot

    Vbot Peon

    Messages:
    107
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    No you can't.

    But you could if you create an .htaccess file like this.
    
    <IfModule dir_module>
        DirectoryIndex YourhiddenIndex.html
    </IfModule>
    Code (markup):
    And upload it to your downloads directory.
     
    Vbot, Mar 4, 2008 IP
  3. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #3
    Better yet, don't put the files in a public directory. Place them below the public_html directory, and use a PHP to read and output them.
     
    nico_swd, Mar 5, 2008 IP