RewriteEngine On

# paksa https
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# izinkan file statis
<FilesMatch "\.(png|jpg|jpeg|gif|webp|css|js|svg|woff2?|ttf|eot|pdf)$">
  Require all granted
</FilesMatch>
