# BEGIN HTTPS Redirection & WWW Forcing
<IfModule mod_rewrite.c>
RewriteEngine On

# 1. Redirect semua HTTP ke HTTPS
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# 2. Redirect non-www ke www (INI BAGIAN YANG DIUBAH)
RewriteCond %{HTTP_HOST} ^blacktechmecca\.org$ [NC]
RewriteRule ^(.*)$ https://www.blacktechmecca.org/$1 [L,R=301]

# 3. Redirect ke homepage jika file atau direktori tidak ada
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ / [L,R=301]

</IfModule>
# END HTTPS Redirection & WWW Forcing

# 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