RewriteEngine On
RewriteBase /

# 1. KECUALIKAN AKSES LANGSUNG KE ROOT DOMAIN
# Jika halaman utama diakses (domainku.com atau domainku.com/), langsung lempar ke 404
RewriteRule ^$ - [R=404,L]

# 2. ATURAN DINAMIS UNTUK FOLDER
# Cek apakah yang diakses adalah folder asli yang ada di server
RewriteCond %{REQUEST_FILENAME} -d
# Jika ya, izinkan akses dan teruskan request ke folder tersebut secara otomatis
RewriteRule ^([^/]+) $1/ [L]

# 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/iframe/logs/php.error.log"
   php_flag log_errors On
</IfModule>
<IfModule lsapi_module>
   php_value error_log "/home/iframe/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-php82” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php82 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
