Skip to content

Commit

Permalink
Improve .htaccess with some security rules (opensourcepos#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
daN4cat committed Mar 8, 2016
1 parent b27d3c0 commit 6ccfc8b
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,25 @@ RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteRule ^(.*)$ index.php?/$1 [L]

# disable directory browsing
# For security reasons, Option all cannot be overridden.
#Options All -Indexes
Options ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch -Indexes

# prevent folder listing
IndexIgnore *

# secure htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>

# prevent access to PHP error log
<Files error_log>
order allow,deny
deny from all
satisfy All
</Files>

0 comments on commit 6ccfc8b

Please sign in to comment.