Created
April 5, 2021 19:49
-
-
Save daniloroddrigues/f35d85cedc62c75ab0baf01979334d3c to your computer and use it in GitHub Desktop.
Gzip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MOD DEFLATE | |
<IfModule mod_deflate.c> | |
# Compress HTML, CSS, JavaScript, Text, XML and fonts | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf | |
AddOutputFilterByType DEFLATE application/x-font-truetype | |
AddOutputFilterByType DEFLATE application/x-font-ttf | |
AddOutputFilterByType DEFLATE application/x-javascript | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE font/opentype | |
AddOutputFilterByType DEFLATE font/otf | |
AddOutputFilterByType DEFLATE font/ttf | |
AddOutputFilterByType DEFLATE font/woff | |
AddOutputFilterByType DEFLATE font/woff2 | |
AddOutputFilterByType DEFLATE image/svg+xml | |
AddOutputFilterByType DEFLATE image/x-icon | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/javascript | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/xml | |
# Remove browser bugs (only needed for really old browsers) | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
Header append Vary User-Agent | |
</IfModule> | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
# Images | |
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" | |
ExpiresByType image/svg+xml "access plus 1 year" | |
ExpiresByType image/x-icon "access plus 1 year" | |
# Video | |
ExpiresByType video/mp4 "access plus 1 year" | |
ExpiresByType video/mpeg "access plus 1 year" | |
# CSS, JavaScript | |
ExpiresByType text/css "access plus 1 month" | |
ExpiresByType text/javascript "access plus 1 month" | |
ExpiresByType application/javascript "access plus 1 month" | |
# Fonts | |
ExpiresByType font/opentype "access plus 1 year" | |
ExpiresByType font/otf "access plus 1 year" | |
ExpiresByType font/ttf "access plus 1 year" | |
ExpiresByType font/woff "access plus 1 year" | |
ExpiresByType font/woff2 "access plus 1 year" | |
# Others | |
ExpiresByType application/pdf "access plus 1 month" | |
ExpiresByType application/x-shockwave-flash "access plus 1 month" | |
</IfModule> | |
# CORS | |
<ifmodule mod_headers.c=""> | |
SetEnvIf Origin "^(.*\.domain\.com)$" ORIGIN_SUB_DOMAIN=$1 | |
Header set Access-Control-Allow-Origin "%{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN | |
Header set Access-Control-Allow-Methods: "*" | |
Header set Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept, Authorization" | |
</ifmodule> | |
# CORS | |
<ifmodule mod_headers.c=""> | |
Header set Access-Control-Allow-Origin: https://viacep.com.br/ | |
</ifmodule> | |
# 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 "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))"> | |
Require all denied | |
## For apache 2.2 and older, replace "Require all denied" with these two lines : | |
# Order deny,allow | |
# Deny from all | |
</FilesMatch> | |
# 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/ | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] | |
RewriteBase / | |
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L] | |
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L] | |
RewriteRule ^system/download/(.*) index.php?route=error/not_found [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] | |
### 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 | |
# 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_value default_charset "UTF-8;" | |
php_value memory_limit 1024M | |
php_value max_execution_time 36000 | |
php_value upload_max_filesize 999M | |
php_value mysql.connect_timeout 20 | |
php_flag session.auto_start Off | |
php_flag session.use_only_cookies On | |
php_flag session.use_cookies On | |
php_flag session.use_trans_sid Off | |
php_value session.cookie_httponly "On;" | |
php_value session.gc_maxlifetime 1800 | |
php_flag display_errors Off | |
php_value error_reporting 0 | |
php_value session.save_path "/var/cpanel/php/sessions/ea-php73" | |
php_value max_input_time 60 | |
php_value max_input_vars 1000 | |
php_value post_max_size 1000M | |
php_flag zlib.output_compression On | |
</IfModule> | |
<IfModule lsapi_module> | |
php_value default_charset "UTF-8;" | |
php_value memory_limit 1024M | |
php_value max_execution_time 36000 | |
php_value upload_max_filesize 999M | |
php_value mysql.connect_timeout 20 | |
php_flag session.auto_start Off | |
php_flag session.use_only_cookies On | |
php_flag session.use_cookies On | |
php_flag session.use_trans_sid Off | |
php_value session.cookie_httponly "On;" | |
php_value session.gc_maxlifetime 1800 | |
php_flag display_errors Off | |
php_value error_reporting 0 | |
php_value session.save_path "/var/cpanel/php/sessions/ea-php73" | |
php_value max_input_time 60 | |
php_value max_input_vars 1000 | |
php_value post_max_size 1000M | |
php_flag zlib.output_compression On | |
</IfModule> | |
# END cPanel-generated php ini directives, do not edit | |
# php -- BEGIN cPanel-generated handler, do not edit | |
# Set the “ea-php73” package as the default “PHP” programming language. | |
<IfModule mime_module> | |
AddHandler application/x-httpd-ea-php73 .php .php7 .phtml | |
</IfModule> | |
# php -- END cPanel-generated handler, do not edit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment