# ----------------------------------------
# Enable Rewrite
# ----------------------------------------
RewriteEngine On
RewriteBase /logo-design/

# ----------------------------------------
# Disable directory listing
# ----------------------------------------
Options -Indexes

# ----------------------------------------
# Default homepage
# ----------------------------------------
DirectoryIndex logo-design.html

# ----------------------------------------
# Remove .html from URL
# ----------------------------------------
RewriteCond %{THE_REQUEST} \s/([^.]+)\.html[\s?]
RewriteRule ^ %1 [R=302,L]

# ----------------------------------------
# Serve .html automatically
# ----------------------------------------
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)$ $1.html [L]

# ----------------------------------------
# 🚫 NO CACHE (TESTING MODE)
# ----------------------------------------
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/css "access plus 1 minute"
  ExpiresByType application/javascript "access plus 1 minute"
</IfModule>

<IfModule mod_headers.c>
  <FilesMatch "\.(css|js)$">
    Header set Cache-Control "no-cache, no-store, must-revalidate"
    Header set Pragma "no-cache"
    Header set Expires "0"
  </FilesMatch>
</IfModule>

# ----------------------------------------
# ✅ Basic Security Headers
# ----------------------------------------
<IfModule mod_headers.c>
  Header set X-Content-Type-Options "nosniff"
  Header set Referrer-Policy "strict-origin-when-cross-origin"
  Header set X-XSS-Protection "1; mode=block"
  Header always set X-Frame-Options "SAMEORIGIN"
</IfModule>