Htaccess File


RewriteEngine On

# Option 2: To rewrite " ->" uncomment the following lines.
# RewriteCond %{HTTPS} !=on
# RewriteCond %{HTTP_HOST} !^www..+$ [NC]
# RewriteCond %{HTTP_HOST} (.+)$ [NC]
# RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
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

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

# prevent access to generate_languages.php
<Files generate_languages.php>
 order deny,allow
 deny from all
 allow from
# My IP(s)
#  allow from


<IfModule mod_expires.c>
          <FilesMatch ".(jpe?g|png|gif|js|css)$">
                      ExpiresActive On
                      ExpiresDefault "access plus 1 week"
Exit mobile version