File: /home/wicomm2/public_html_backup/zema/.htaccess
##### LOCAWEB - NAO REMOVER #####
AddHandler php74-script .php
suPHP_ConfigPath /home/wicomm1/
##### LOCAWEB - NAO REMOVER #####
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
# Definir o tipo de conteúdo MIME para arquivos JavaScript como application/javascript
<IfModule mod_mime.c>
AddType application/javascript .js
</IfModule>
# Servir arquivos gzip se eles existirem
<IfModule mod_rewrite.c>
RewriteEngine On
# Serve arquivos gzip se eles existirem
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -s
RewriteRule ^(.*)$ $1.gz [QSA]
</IfModule>
# Adicionar cabeçalho de tipo de conteúdo correto para arquivos gzip
<IfModule mod_headers.c>
<FilesMatch "\.js\.gz$">
Header set Content-Encoding gzip
Header set Content-Type "application/javascript"
</FilesMatch>
<FilesMatch "\.css\.gz$">
Header set Content-Encoding gzip
Header set Content-Type "text/css"
</FilesMatch>
<FilesMatch "\.json\.gz$">
Header set Content-Encoding gzip
Header set Content-Type "application/json"
</FilesMatch>
<FilesMatch "\.xml\.gz$">
Header set Content-Encoding gzip
Header set Content-Type "application/xml"
</FilesMatch>
<FilesMatch "\.svg\.gz$">
Header set Content-Encoding gzip
Header set Content-Type "image/svg+xml"
</FilesMatch>
</IfModule>
# Configuração de Cache para Recursos Estáticos
<IfModule mod_expires.c>
ExpiresActive On
# Configurar cache para imagens
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
# Configurar cache para fontes
ExpiresByType font/woff2 "access plus 1 year"
ExpiresByType font/woff "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType font/opentype "access plus 1 year"
# Configurar cache para CSS e JavaScript
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
# Configurar cache para JSON e XML
ExpiresByType application/json "access plus 1 year"
ExpiresByType application/xml "access plus 1 year"
</IfModule>
<IfModule mod_headers.c>
# Configurar Cache-Control para recursos estáticos
<FilesMatch "\.(css|js|jpg|jpeg|png|gif|webp|svg|ico|woff|woff2|ttf|otf)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
# Remover ETag para garantir que o controle de cache seja feito com Cache-Control e Expires
Header unset ETag
FileETag None
</IfModule>
# BEGIN WordPress
# As diretrizes (linhas) entre "BEGIN WordPress" e "END WordPress" são
# geradas dinamicamente e só devem ser modificadas através de filtros do WordPress.
# Quaisquer alterações nas diretivas entre esses marcadores serão sobrescritas.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress