Options -Indexes

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    # 1. EXCLUDE ASSETS — langsung stop, tanpa cek file exist
    RewriteRule ^(cdn-images|images-cdn|css|js|maintenance\.html) - [L]

    # 2. MAINTENANCE MODE (HANYA HOME)
    ErrorDocument 503 /maintenance.html
    RewriteCond %{REQUEST_URI} ^/($|index\.html) [NC]
    RewriteCond %{REQUEST_URI} !^/maintenance\.html$
    RewriteRule ^.*$ - [R=503,L]

    # 3. FORCE TRAILING SLASH
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(.*)/$
    RewriteRule ^(.*)$ /$1/ [L,R=301]

    # 4. REDIRECT .HTML KE SLASH
    RewriteCond %{THE_REQUEST} \s/+(.*?)\.html[\s?] [NC]
    RewriteRule ^(.*)\.html$ /%1/ [R=301,L]

    # 5. INTERNAL MAPPING (Serve Content)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{DOCUMENT_ROOT}/$1.html -f
    RewriteRule ^(.*)/$ $1.html [L]
</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 error_log "/home/skyreborn/logs/php.error.log"
   php_flag log_errors On
</IfModule>
<IfModule lsapi_module>
   php_value error_log "/home/skyreborn/logs/php.error.log"
   php_flag log_errors On
</IfModule>
# END cPanel-generated php ini directives, do not edit

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php81” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
