# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log|twig)$">
 Order deny,allow
 Deny from all
</FilesMatch>

##permissão para liberar arquivos de fonte, para origens diferentes, feito para não perder a fonte em subdominios
<IfModule mod_headers.c>
  <FilesMatch "\.(ttf|ttc|otf|eot|woff)$">
    Header set Access-Control-Allow-Origin "*"
  </FilesMatch>
  Header set X-XSS-Protection "1; mode=block"
</IfModule>

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# CSS
ExpiresByType text/css "access plus 1 year"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
# Image
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
#font
ExpiresByType application/font-woff2 "access plus 1 year"
</IfModule>

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

#RewriteBase {{cli_folder_path}}
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^facebookcatalog.xml$ index.php?route=feed/facebook_catalog [L]
RewriteRule ^robots.txt$ index.php?route=common/robots [NS,L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteRule ^retornoitau$ index.php?route=payment/itaushopline/retorno [L]
RewriteRule ^retornocron$ index.php?route=payment/itaushopline/cron [L]
RewriteRule ^redecallback$ index.php?route=payment/rede_credito/callback [L]
RewriteRule ^pagarmecallback$ index.php?route=payment/pagarme/callback [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

#faz para todos os clientes que trabalhem em cima do dominio... sempre deixar comentado itens dentro dessa expressao.
#Atualizador automático le essas opções e remove comentário sozinho...
#Se for necessário incluir comentários dentro das expressões, incluir 2x ##

#[begin][domain]
RewriteCond    %{HTTP_HOST} !^www\.
RewriteCond 	%{HTTP_HOST} !(.*)futurasistemas\.com\.br [NC]
RewriteCond 	%{HTTP_HOST} !(.*)\.novaecom\.com\.br [NC]
RewriteCond 	%{HTTP_HOST} !(.*)\.novaecom\.com\.br_LISTA_ESCOLAR [NC]
RewriteRule    ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
#[end][domain] fecha condicao.

#[begin][subdomain]
#RewriteCond %{HTTPS} !=on
#RewriteCond 	%{HTTP_HOST} !(.*)futurasistemas\.com\.br [NC]
#RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
#[end][subdomain] fecha condicao.

##condição para redirecionar para https quando cliente já digitou o wwww
RewriteCond %{HTTP_HOST} ^www\.
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

##condição para redirecionar para https quando for exclusivamente dominio futurasistemas.com.br
RewriteCond  %{HTTP_HOST} (.*)futurasistemas\.com\.br [NC]
RewriteCond %{HTTPS} !=on
RewriteRule    ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

AddType application/vnd.ms-fontobject    .eot
AddType application/x-font-opentype      .otf
AddType image/svg+xml                    .svg
AddType application/x-font-ttf           .ttf
AddType application/font-woff            .woff
AddType application/font-woff2           .woff2

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none

# php -- BEGIN cPanel-generated handler, do not edit
# Defina o pacote “ea-php71” como a linguagem padrão de programação “PHP”.
<If "%{SERVER_NAME} != 'darthrevan.futurasistemas.com.br'">

<IfModule mime_module>
  AddType application/x-httpd-ea-php80 .php .php8 .phtml
</IfModule>

</If>
# php -- END cPanel-generated handler, do not edit