Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    221
    Plugin Contributions
    1

    Default Security recommendation .htaccess

    The Site Security Recommendations recommend that you add the following to an .htaccess file and place in your folders:
    Code:
    #.htaccess to prevent unauthorized directory browsing or access to .php files
    IndexIgnore */*
    <Files *.php>
    Order Deny,Allow
    Deny from all
    </Files>
    Now, I've seen references throughout the forums here (after someone got hacked) to use the following to prevent directory browsing and access to files:
    Code:
    OPTIONS -Indexes -ExecCGI

    My question, do both of these do the same thing? Is one more efficient than the other? Should they both exist in the .htaccess?

  2. #2
    Join Date
    Mar 2009
    Posts
    221
    Plugin Contributions
    1

    Default Re: Security recommendation .htaccess

    OK. Looks like you should only use OPTIONS -Indexes -ExecCGI in a directory that has image files. It shouldn't be referenced in any other folder. Older posts (can't seem to find them anymore) had some conflicting information about this.

  3. #3
    Join Date
    Nov 2004
    Location
    Norfolk, United Kingdom
    Posts
    3,036
    Plugin Contributions
    2

    Default Re: Security recommendation .htaccess

    Well, you only need to use .htaccess to prevent Directory Browsing if that is permitted on the server your site is hosted on - and it should not be permitted for obvious security reasons.

    Best advice is to contact the host and get them to turn it off server-wide.

    Vger

 

 

Similar Threads

  1. Security with .htaccess
    By icikite in forum General Questions
    Replies: 4
    Last Post: 4 Apr 2013, 08:03 PM
  2. htaccess and website security
    By stevefriedman71 in forum General Questions
    Replies: 4
    Last Post: 3 May 2012, 10:14 AM
  3. Extra admin security by changed .htaccess?
    By luciano9876 in forum General Questions
    Replies: 0
    Last Post: 11 Apr 2011, 09:58 AM
  4. cPanel vs htaccess security
    By RobWUK in forum General Questions
    Replies: 3
    Last Post: 21 Jan 2010, 01:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg