# ==========================================================
# SISFO FARMACIA
# PUBLIC .HTACCESS
# ==========================================================

Options -Indexes

<IfModule mod_rewrite.c>

    RewriteEngine On

    # CodeIgniter 4
    RewriteBase /sisfo_farmacia/public/

    # ------------------------------------------------------
    # Hilangkan trailing slash
    # ------------------------------------------------------

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # ------------------------------------------------------
    # Jika bukan file/folder asli,
    # kirim ke index.php CodeIgniter
    # ------------------------------------------------------

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ index.php/$1 [L,QSA]

    # ------------------------------------------------------
    # Authorization Header
    # ------------------------------------------------------

    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

</IfModule>

<IfModule !mod_rewrite.c>

    ErrorDocument 404 index.php

</IfModule>

ServerSignature Off