# Frontiers Article Generator & Reader - Apache / cPanel configuration
    
    # 1. Directory Index
    DirectoryIndex index.html admin.html

    # 2. MIME Types
    <IfModule mod_mime.c>
      AddType text/plain .tex .bib
      AddType application/json .json
      AddType font/woff2 .woff2
      AddType font/woff .woff
      AddType image/svg+xml .svg
    </IfModule>

    # 3. Character Encoding
    AddDefaultCharset UTF-8

    # 4. Reverse Proxy to Python backend on port 8000
    <IfModule mod_rewrite.c>
      RewriteEngine On

      # Pass Authorization and Cookie headers
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

      # Forward all API requests directly to the Python server
      RewriteRule ^api/(.*)$ http://127.0.0.1:8000/api/$1 [P,L]

      # Forward any other dynamic requests that don't match static files
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ http://127.0.0.1:8000/$1 [P,L]
    </IfModule>
    