Options +FollowSymLinks -MultiViews

# Secuirty Control
<FilesMatch "\.(htaccess|htpasswd|ini|log|sh|inc|bak|tpl)$">
Order Allow,Deny
Deny from all
</FilesMatch>

# Cache Control
<IfModule mod_headers.c>
<FilesMatch "\.(jpg|jpeg|png|gif|swf|css|js)$">
    Header set Cache-Control "max-age=604800, public"
</FilesMatch>
</IfModule>

# Gzip Control
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE image/jpg
AddOutputFilterByType DEFLATE image/png
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/javascript
</IfModule>

<IfModule mod_rewrite.c>
   RewriteEngine On

   #RewriteCond %{HTTPS} !=on
   #RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

   RewriteRule . - [E=REWRITEBASE:/]
   # Uncomment this if you are getting routing errors:
   RewriteBase /

   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d

   # Installer
   RewriteRule ^install/?$ install.php [L,QSA]
</ifModule>

<IfModule mod_rewrite.c>
   RewriteEngine On

   #RewriteCond %{HTTPS} !=on
   #RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

   RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
   
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^ index.php [QSA,L]
</IfModule>

# enable hiding .php extension
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([^/]+)$ $1.php

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
