php_value date.timezone Asia/Bangkok

Options +SymLinksIfOwnerMatch
RewriteEngine On

# Force HTTPS (Redirect http:// to https://)
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

# Redirect www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/index\.php [NC]
RewriteRule ^index\.php$ / [R=301,L]
##################################

# Allow Installatron requests (keep this if needed)
RewriteCond %{REQUEST_FILENAME} deleteme\.\w+\.php
RewriteRule (.*) - [L]


# Handle Laravel URLs Properly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Existing Laravel rule (keep this to avoid breaking your Laravel app)
RewriteRule ^ index.php [L]


# One year for image files
<filesMatch ".(jpg|jpeg|png|gif|ico|svg)$">
Header set Cache-Control "max-age=31536000, public"
</filesMatch>
# One month for css and js
<filesMatch ".(css|js)$">
Header set Cache-Control "max-age=2628000, public"
</filesMatch>