```apache
# ============================================================
# Aadhithiya International School — School App Website
# .htaccess
# Main file: index.html
# ============================================================

<IfModule mod_rewrite.c>
    RewriteEngine On

    # --------------------------------------------------------
    # 1. Force HTTPS
    # --------------------------------------------------------
    RewriteCond %{HTTPS} !=on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    # --------------------------------------------------------
    # 2. Force non-www
    #    Example:
    #    https://www.example.com
    #    ->
    #    https://example.com
    # --------------------------------------------------------
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]

</IfModule>


# ------------------------------------------------------------
# 3. Default Homepage
# ------------------------------------------------------------
DirectoryIndex index.html


# ------------------------------------------------------------
# 4. Disable Directory Listing
# ------------------------------------------------------------
Options -Indexes


# ------------------------------------------------------------
# 5. Protect Hidden Files
# ------------------------------------------------------------
<FilesMatch "^\.">
    Require all denied
</FilesMatch>


# Protect .htaccess itself
<Files ".htaccess">
    Require all denied
</Files>


# ------------------------------------------------------------
# 6. MIME Types
# ------------------------------------------------------------
<IfModule mod_mime.c>

    # HTML
    AddType text/html .html .htm

    # CSS
    AddType text/css .css

    # JavaScript
    AddType application/javascript .js

    # JSON
    AddType application/json .json

    # SVG
    AddType image/svg+xml .svg .svgz

    # Images
    AddType image/png .png
    AddType image/jpeg .jpg .jpeg
    AddType image/webp .webp
    AddType image/gif .gif

    # Fonts
    AddType font/woff .woff
    AddType font/woff2 .woff2
    AddType font/ttf .ttf
    AddType font/otf .otf

    # Video
    AddType video/mp4 .mp4
    AddType video/webm .webm

    # Android App
    AddType application/vnd.android.package-archive .apk

</IfModule>


# ------------------------------------------------------------
# 7. Force APK Download
# ------------------------------------------------------------
<IfModule mod_headers.c>

    <FilesMatch "\.apk$">
        Header set Content-Disposition "attachment"
        Header set X-Content-Type-Options "nosniff"
    </FilesMatch>

</IfModule>


# ------------------------------------------------------------
# 8. Video Byte Range Support
#    Allows users to seek/skip in MP4 videos
# ------------------------------------------------------------
<IfModule mod_headers.c>

    <FilesMatch "\.(mp4|webm)$">
        Header set Accept-Ranges "bytes"
    </FilesMatch>

</IfModule>


# ------------------------------------------------------------
# 9. Security Headers
# ------------------------------------------------------------
<IfModule mod_headers.c>

    # Prevent clickjacking
    Header always set X-Frame-Options "SAMEORIGIN"

    # Prevent MIME sniffing
    Header always set X-Content-Type-Options "nosniff"

    # Referrer protection
    Header always set Referrer-Policy "strict-origin-when-cross-origin"

    # Browser permissions
    Header always set Permissions-Policy "geolocation=(), microphone=(), camera=()"

    # Legacy XSS protection
    Header always set X-XSS-Protection "1; mode=block"

</IfModule>


# ------------------------------------------------------------
# 10. Compression
# ------------------------------------------------------------
<IfModule mod_deflate.c>

    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/json
    AddOutputFilterByType DEFLATE image/svg+xml

</IfModule>


# ------------------------------------------------------------
# 11. Browser Caching
# ------------------------------------------------------------
<IfModule mod_expires.c>

    ExpiresActive On

    # HTML - always check for updates
    ExpiresByType text/html "access plus 0 seconds"

    # CSS / JavaScript
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType application/javascript "access plus 1 week"

    # Images
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/webp "access plus 1 month"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/svg+xml "access plus 1 month"

    # Fonts
    ExpiresByType font/woff "access plus 1 year"
    ExpiresByType font/woff2 "access plus 1 year"
    ExpiresByType font/ttf "access plus 1 year"

    # Videos
    ExpiresByType video/mp4 "access plus 1 month"
    ExpiresByType video/webm "access plus 1 month"

    # APK
    ExpiresByType application/vnd.android.package-archive "access plus 1 day"

</IfModule>


# ------------------------------------------------------------
# 12. Optional Custom Error Pages
# ------------------------------------------------------------
# Uncomment only if these files actually exist.

# ErrorDocument 404 /404.html
# ErrorDocument 500 /500.html


# ------------------------------------------------------------
# 13. Optional HSTS
# ------------------------------------------------------------
# Enable ONLY after confirming your entire website works
# correctly with HTTPS.
#
# <IfModule mod_headers.c>
#     Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
# </IfModule>
```
