#DirectorySlash Off
RewriteEngine On

# Remover extensão do arquivo (exemplo: /arquivo.php para /arquivo)
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L]

# TESTE
# RewriteEngine On
# RewriteRule ^informacoes/(.*)$ /qualifac/$1 [R,L]

# Redirecionar internamente as páginas sem extensão para o arquivo correspondente (crucial para o funcionamento da página)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]

<ifModule mod_deflate.c>
    <filesMatch "\.(js|css|html|php)$">
        AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
    </filesMatch>
</ifModule>

# Força o HTTPS
RewriteCond %{HTTPS} off 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

# Redireciona pasta informacoes
#<IfModule mod_rewrite.c>
#	RewriteRule ^informacoes/(.*)$ http://localhost/sitebasebs5/$1 [L,NC,R=302]
#</IfModule>

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/json
    AddType x-font/otf .otf
    AddType x-font/ttf .ttf
    AddType x-font/eot .eot
    AddType x-font/woff .woff
    AddType image/svg+xml .svg
    AddType application/x-font-woff .woff
    AddType application/x-font-ttf .ttf
    AddType application/x-font-otf .otf
    AddType application/x-font-eot .eot
    AddType application/vnd.ms-fontobject .eot
    <IfModule mod_mime.c>
        AddType application/x-httpd-php .php .php5 .phtml
    </IfModule>
</IfModule>
