# Clyde Motors - Main .htaccess
# afribay.co.ke

RewriteEngine On
Options -Indexes
AddDefaultCharset UTF-8

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_file_uploads 20
php_value max_execution_time 300
php_value memory_limit 256M

<FilesMatch "^(config\.php|database\.sql|\.env)">
    Order allow,deny
    Deny from all
</FilesMatch>

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/json
</IfModule>

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType text/javascript "access plus 1 week"
</IfModule>

ErrorDocument 404 /404.html

<IfModule mod_rewrite.c>
    RewriteRule ^uploads/.*\.(php|php3|php4|php5|phtml|pl|py|jsp|asp|sh|cgi)$ - [F,L,NC]
</IfModule>