<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  # Hilangkan index.php dari URL
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L]

  # Atur agar direktori /application dan /system tidak bisa diakses langsung
  RedirectMatch 404 ^/(application|system)/

</IfModule>

# Perlindungan file .htaccess sendiri
<Files .htaccess>
  Order allow,deny
  Deny from all
</Files>
