###########################################
# Browser Cache for images, css, js
###########################################
<IfModule mod_expires.c>
  ExpiresActive On

  # Images
  ExpiresByType image/webp "access plus 1 year"
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/gif "access plus 1 year"

  # CSS & JS
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType text/javascript "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"
</IfModule>

###########################################
# Do NOT cache PHP files (Fix session loss)
###########################################
<IfModule mod_headers.c>
  <FilesMatch "\.php$">
    Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
    Header set Pragma "no-cache"
    Header set Expires 0
  </FilesMatch>
</IfModule>

###########################################
# cPanel PHP Handler
###########################################
# BEGIN cPanel-generated handler
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
# END cPanel-generated handler