# Forzar HTTPS (si el toggle de cPanel no está activo)
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Índices y MultiViews
DirectoryIndex index.php index.php
Options -MultiViews

# Rewrites tipo front-controller (si usas URLs limpias)
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  # No reescribir si el archivo o el directorio existe
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]

  # Todo lo demás a index.php
  RewriteRule ^ index.php [L]
</IfModule>

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php8_module>
   php_value date.timezone "UTC"
   php_value memory_limit 512M
   php_value max_execution_time 120
   php_value max_input_time 120
   php_value max_input_vars 5000
   php_value post_max_size 64M
   php_value upload_max_filesize 64M
   php_flag display_errors Off
   php_flag display_startup_errors Off
   php_flag log_errors On
   php_value error_log "/home/jportales/logs/php-error.log"
   php_value session.gc_maxlifetime 28800
   php_value session.cookie_httponly "1"
   php_flag session.use_strict_mode On
   php_value session.cookie_secure "1"
</IfModule>
<IfModule lsapi_module>
   php_value date.timezone "UTC"
   php_value memory_limit 512M
   php_value max_execution_time 120
   php_value max_input_time 120
   php_value max_input_vars 5000
   php_value post_max_size 64M
   php_value upload_max_filesize 64M
   php_flag display_errors Off
   php_flag display_startup_errors Off
   php_flag log_errors On
   php_value error_log "/home/jportales/logs/php-error.log"
   php_value session.gc_maxlifetime 28800
   php_value session.cookie_httponly "1"
   php_flag session.use_strict_mode On
   php_value session.cookie_secure "1"
</IfModule>
# END cPanel-generated php ini directives, do not edit

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php81” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
