# ==============================================================================
#  public/.htaccess  -  VALIDO PARA LOCAL XAMPP
# ==============================================================================

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On
    RewriteBase /app_api_farmater_new/public/

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

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

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

# Handlers PHP: en XAMPP local usamos application/x-httpd-php.
# En caso de subir esto a hosting cPanel/Hostinger, los AddHandler/SetHandler
# especificos de cPanel se aplican solo si existe el modulo.
<IfModule mod_mime.c>
    AddHandler application/x-httpd-php .php
    AddHandler application/x-httpd-ea-php82 .php
    AddHandler application/x-httpd-alt-php82___lsphp .php
    AddType text/html .php
</IfModule>

<IfModule php_module>
    <FilesMatch "\.php$">
        SetHandler application/x-httpd-php
    </FilesMatch>
</IfModule>
<IfModule lsapi_module>
    <FilesMatch "\.php$">
        SetHandler application/x-httpd-alt-php82___lsphp
    </FilesMatch>
</IfModule>
