<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(www\.)?8k\.art$ [NC]
RewriteRule ^(.*)$ https://8k.art/$1 [L,R=301]
</IfModule>

# Show full filenames in indexes (optional)
IndexOptions NameWidth=*

# Default all text/* types to UTF-8
AddDefaultCharset utf-8

ErrorDocument 403 /404.html
ErrorDocument 404 /404.html

# Explicitly force .txt files to be sent as UTF-8
AddType "text/plain; charset=utf-8" .txt

# ------------------------------------------------------------
# CORS: allow JavaScript apps (including file:// origin "null")
# to read public playlist text files via fetch()
# ------------------------------------------------------------
<IfModule mod_headers.c>
  <FilesMatch "\.(txt)$">
    Header always set Access-Control-Allow-Origin "*"
    Header always set Access-Control-Allow-Methods "GET, OPTIONS"
    Header always set Access-Control-Allow-Headers "Content-Type"
    Header always set Vary "Origin"
  </FilesMatch>
</IfModule>

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php8_module>
   php_value default_charset "UTF-8"
</IfModule>
<IfModule lsapi_module>
   php_value default_charset "UTF-8"
</IfModule>
# END cPanel-generated php ini directives, do not edit
