Options +FollowSymLinks
DirectoryIndex index.php

RewriteEngine On

# Forçar HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Página inicial
RewriteRule ^$ index.php?caminho=home.php [NC,L]
RewriteRule ^login$ index.php?caminho=login.php [NC,L]
RewriteRule ^login/ok$ index.php?caminho=login.php&aviso=ok [NC,L]
RewriteRule ^login/nLogin$ index.php?caminho=login.php&aviso=nLogin [NC,L]
RewriteRule ^login/session$ index.php?caminho=login.php&aviso=session [NC,L]
#RewriteRule ^index.php$ index.php?caminho=home.php [NC,L]

# Páginas amigáveis
RewriteRule ^cadastro$ index.php?caminho=cadastro.php [NC,L]
RewriteRule ^cadastro/([0-9]+)$ index.php?caminho=cadastro.php&aviso=$1 [NC,L]
RewriteRule ^galeriaVideos$ index.php?caminho=galeriaVideos.php [NC,L]

# Painel de controle
RewriteRule ^controle/$ controle/index.php?menu=0&caminho=home.php [NC,L]
RewriteRule ^controle/home$ controle/index.php?menu=0&caminho=home.php [NC,L]
RewriteRule ^controle/galeria$ controle/index.php?menu=4&caminho=galeria.php [NC,L]
RewriteRule ^controle/usuariosLeitura$ controle/index.php?menu=5&caminho=usuariosLeitura.php [NC,L]

# php -- BEGIN cPanel-generated handler, do not edit
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php74___lsphp .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

# 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 php7_module>
   php_flag display_errors Off
   php_value max_execution_time 30
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 512M
   php_value post_max_size 256M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
   php_value upload_max_filesize 256M
   php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
   php_flag display_errors Off
   php_value max_execution_time 30
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 512M
   php_value post_max_size 256M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
   php_value upload_max_filesize 256M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit
