# Bright Commerce canonical URL and SEO rules
DirectoryIndex index.html page.html

<IfModule mod_rewrite.c>
RewriteEngine On

# Force HTTPS and the non-www canonical host.
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{HTTP_HOST} ^www\.brightccg\.com$ [NC]
RewriteRule ^ https://brightccg.com%{REQUEST_URI} [R=301,L,NE]

# Redirect direct Framer-export filenames to clean directory URLs.
RewriteCond %{THE_REQUEST} \s/+index\.html(?:[?\s]) [NC]
RewriteRule ^index\.html$ / [R=301,L]
RewriteCond %{THE_REQUEST} \s/+(.*/)?page\.html(?:[?\s]) [NC]
RewriteRule ^(.*/)?page\.html$ /$1 [R=301,L]

</IfModule>

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript application/javascript application/json application/ld+json application/xml text/xml image/svg+xml
</IfModule>

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access plus 1 hour"
ExpiresByType application/xml "access plus 1 hour"
ExpiresByType text/xml "access plus 1 hour"
ExpiresByType text/plain "access plus 1 hour"
ExpiresByType image/svg+xml "access plus 7 days"
</IfModule>

<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>

# php -- BEGIN cPanel-generated handler, do not edit
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
