-
AuthorPosts
-
July 28, 2014 at 7:51 pm #200061
Hi there,
I had a question about gzip compression. I’ve used Gantry previously without this issue, and I’m not sure if that affects anything, but I’m having problems enabling gzip with T3.
This is my current .htaccess file. I’ve used this previously with sites that weren’t built on T3 and gzip has worked with no problems.
##
# @package Joomla
# @copyright Copyright (C) 2005 – 2014 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
####
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line just below this section: ‘Options +FollowSymLinks’ may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url’s. If they work,
# it has been set by your server administrator and you do not need it set here.
#### Can be commented out if causes errors, see notes above.
Options +FollowSymLinks## Mod_rewrite in use.
RewriteEngine On
## Begin – Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*([^)]*)
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|{0,2})
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End – Rewrite rules to block out some common exploits.## Begin – Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End – Custom redirects##
# Uncomment following line if your webserver’s URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##RewriteBase /~anctest/dating/
## Begin – Joomla! core SEF Section.
#
RewriteRule .* –
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index.php
# and the requested path and file doesn’t directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn’t directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End – Joomla! core SEF Section.# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript# Or, compress certain file types by extension:
<files *.html>
SetOutputFilter DEFLATE
</files>
<IfModule mod_mime.c>
AddType text/css .css
AddType application/x-javascript .js
AddType text/x-component .htc
AddType text/html .html .htm
AddType text/richtext .rtf .rtx
AddType image/svg+xml .svg .svgz
AddType text/plain .txt
AddType text/xsd .xsd
AddType text/xsl .xsl
AddType text/xml .xml
AddType video/asf .asf .asx .wax .wmv .wmx
AddType video/avi .avi
AddType image/bmp .bmp
AddType application/java .class
AddType video/divx .divx
AddType application/msword .doc .docx
AddType application/vnd.ms-fontobject .eot
AddType application/x-msdownload .exe
AddType image/gif .gif
AddType application/x-gzip .gz .gzip
AddType image/x-icon .ico
AddType image/jpeg .jpg .jpeg .jpe
AddType application/vnd.ms-access .mdb
AddType audio/midi .mid .midi
AddType video/quicktime .mov .qt
AddType audio/mpeg .mp3 .m4a
AddType video/mp4 .mp4 .m4v
AddType video/ogv .ogv
AddType video/mpeg .mpeg .mpg .mpe
AddType application/vnd.ms-project .mpp
AddType application/x-font-otf .otf
AddType application/vnd.oasis.opendocument.database .odb
AddType application/vnd.oasis.opendocument.chart .odc
AddType application/vnd.oasis.opendocument.formula .odf
AddType application/vnd.oasis.opendocument.graphics .odg
AddType application/vnd.oasis.opendocument.presentation .odp
AddType application/vnd.oasis.opendocument.spreadsheet .ods
AddType application/vnd.oasis.opendocument.text .odt
AddType audio/ogg .ogg
AddType application/pdf .pdf
AddType image/png .png
AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
AddType audio/x-realaudio .ra .ram
AddType application/x-shockwave-flash .swf
AddType application/x-tar .tar
AddType image/tiff .tif .tiff
AddType application/x-font-ttf .ttf .ttc
AddType audio/wav .wav
AddType application/font-woff .woff
AddType audio/wma .wma
AddType application/vnd.ms-write .wri
AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
AddType application/zip .zip
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css A31536000
ExpiresByType application/x-javascript A31536000
ExpiresByType text/x-component A31536000
ExpiresByType text/html A3600
ExpiresByType text/richtext A3600
ExpiresByType image/svg+xml A3600
ExpiresByType text/plain A3600
ExpiresByType text/xsd A3600
ExpiresByType text/xsl A3600
ExpiresByType text/xml A3600
ExpiresByType video/asf A31536000
ExpiresByType video/avi A31536000
ExpiresByType image/bmp A31536000
ExpiresByType application/java A31536000
ExpiresByType video/divx A31536000
ExpiresByType application/msword A31536000
ExpiresByType application/vnd.ms-fontobject A31536000
ExpiresByType application/x-msdownload A31536000
ExpiresByType image/gif A31536000
ExpiresByType application/x-gzip A31536000
ExpiresByType image/x-icon A31536000
ExpiresByType image/jpeg A31536000
ExpiresByType application/vnd.ms-access A31536000
ExpiresByType audio/midi A31536000
ExpiresByType video/quicktime A31536000
ExpiresByType audio/mpeg A31536000
ExpiresByType video/mp4 A31536000
ExpiresByType video/mpeg A31536000
ExpiresByType video/ogv A31536000
ExpiresByType application/vnd.ms-project A31536000
ExpiresByType application/x-font-otf A31536000
ExpiresByType application/vnd.oasis.opendocument.database A31536000
ExpiresByType application/vnd.oasis.opendocument.chart A31536000
ExpiresByType application/vnd.oasis.opendocument.formula A31536000
ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
ExpiresByType application/vnd.oasis.opendocument.text A31536000
ExpiresByType audio/ogg A31536000
ExpiresByType application/pdf A31536000
ExpiresByType image/png A31536000
ExpiresByType application/vnd.ms-powerpoint A31536000
ExpiresByType audio/x-realaudio A31536000
ExpiresByType image/svg+xml A31536000
ExpiresByType application/x-shockwave-flash A31536000
ExpiresByType application/x-tar A31536000
ExpiresByType image/tiff A31536000
ExpiresByType application/x-font-ttf A31536000
ExpiresByType application/font-woff A31536000
ExpiresByType audio/wav A31536000
ExpiresByType audio/wma A31536000
ExpiresByType application/vnd.ms-write A31536000
ExpiresByType application/vnd.ms-excel A31536000
ExpiresByType application/zip A31536000
</IfModule>
<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
</IfModule>
</IfModule>
<FilesMatch “.(css|js|htc|CSS|JS|HTC)$”>
<IfModule mod_headers.c>
Header set Pragma “public”
Header append Cache-Control “public, must-revalidate, proxy-revalidate”
</IfModule>
FileETag MTime Size
</FilesMatch>
<FilesMatch “.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|XML)$”>
<IfModule mod_headers.c>
Header set Pragma “public”
Header append Cache-Control “public, must-revalidate, proxy-revalidate”
</IfModule>
FileETag MTime Size
</FilesMatch>
<FilesMatch “.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|ogv|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|woff|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|WAV|WOFF|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|ZIP)$”>
<IfModule mod_headers.c>
Header set Pragma “public”
Header append Cache-Control “public, must-revalidate, proxy-revalidate”
Header set Connection keep-alive
</IfModule>
FileETag MTime Size
</FilesMatch>When I test the page, no files are gzipped.
Is this an issue with T3?
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
May 15, 2015 at 4:32 pm #570708Hi,
Can you explain how should I add to the .htaccess the [ROOT]/t3-assets so it would go through the GZIP process?
Thanks!
OmrigezNinja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
May 18, 2015 at 3:17 am #570852<em>@omrigez 473542 wrote:</em><blockquote>Hi,
Can you explain how should I add to the .htaccess the [ROOT]/t3-assets so it would go through the GZIP process?
Thanks!
Omrigez</blockquote>gzip process will will create files into [ROOT]/t3-assets folder, that’s why you have to grant the permission to access [ROOT]/t3-assets folder. If your hosting does not allow, you have to config via .htaccess file with rule: AllowOverride ALL
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
May 18, 2015 at 3:17 am #735914<em>@omrigez 473542 wrote:</em><blockquote>Hi,
Can you explain how should I add to the .htaccess the [ROOT]/t3-assets so it would go through the GZIP process?
Thanks!
Omrigez</blockquote>gzip process will will create files into [ROOT]/t3-assets folder, that’s why you have to grant the permission to access [ROOT]/t3-assets folder. If your hosting does not allow, you have to config via .htaccess file with rule: AllowOverride ALL
gardinie2014 Friendgardinie2014
- Join date:
- December 2014
- Posts:
- 35
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 3
- Thanked:
- 5 times in 2 posts
August 16, 2015 at 9:26 pm #662233<em>@Ninja Lead 473762 wrote:</em><blockquote>gzip process will will create files into [ROOT]/t3-assets folder, that’s why you have to grant the permission to access [ROOT]/t3-assets folder. If your hosting does not allow, you have to config via .htaccess file with rule: AllowOverride ALL</blockquote>
Hi Ninja Lead,
You say that it needs to be done but you don’t explain HOW to grant permission in the .htaccess file.
I have searched everywhere and just like omrigez I’d like to know the answer as you didn’t provide it –
and AllowOverride ALL creates an Server Error 500 so aside from the fact that I don’t like to Override everything [not knowing what that is overriding] it would be great to know.
Cheers,
Emmanuel Lemor.
gardinie2014 Friendgardinie2014
- Join date:
- December 2014
- Posts:
- 35
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 3
- Thanked:
- 5 times in 2 posts
August 16, 2015 at 9:26 pm #745576<em>@Ninja Lead 473762 wrote:</em><blockquote>gzip process will will create files into [ROOT]/t3-assets folder, that’s why you have to grant the permission to access [ROOT]/t3-assets folder. If your hosting does not allow, you have to config via .htaccess file with rule: AllowOverride ALL</blockquote>
Hi Ninja Lead,
You say that it needs to be done but you don’t explain HOW to grant permission in the .htaccess file.
I have searched everywhere and just like omrigez I’d like to know the answer as you didn’t provide it –
and AllowOverride ALL creates an Server Error 500 so aside from the fact that I don’t like to Override everything [not knowing what that is overriding] it would be great to know.
Cheers,
Emmanuel Lemor.
jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
August 17, 2015 at 1:53 am #662247Hi there
As Ninja Lead said
<blockquote>that’s why you have to grant the permission to access [ROOT]/t3-assets folder</blockquote>
Please check this document to work with chmod
https://en.wikipedia.org/wiki/Chmod
In fact , you should ask your sysadmin about this issue. It’s server side.
Thank you,
Viet Vujooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
August 17, 2015 at 1:53 am #745590Hi there
As Ninja Lead said
<blockquote>that’s why you have to grant the permission to access [ROOT]/t3-assets folder</blockquote>
Please check this document to work with chmod
https://en.wikipedia.org/wiki/Chmod
In fact , you should ask your sysadmin about this issue. It’s server side.
Thank you,
Viet Vugardinie2014 Friendgardinie2014
- Join date:
- December 2014
- Posts:
- 35
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 3
- Thanked:
- 5 times in 2 posts
August 17, 2015 at 2:06 am #662250Hi Viet Vu,
Thank you for replying.
I am familiar with Chmod but the question is what SPECIFICALLY must be allowed/permitted.
Since the site is coming up correctly the [ROOT]/t3-assets folder is accessible BUT Google PageSpeed Checker still claims that the site isn’t gzipping all that it needs to be:
“Compressing resources with gzip or deflate can reduce the number of bytes sent over the network.
Compressing http://www.gardinie.com/t3-assets/js/js-b675e.js?t=378 could save 232.9KiB (70% reduction).
etc”
as well as YSlow which also claims it’s not working.
as an example, yet http://www.gziptest.com and http://checkgzipcompression.com/ and a few others say that it’s enabled and working.
There are 12 un-‘gzipped’ files of which 6 are in the t3asset folder…
Any further help would be greatly appreciated.
Cheers,
Emmanuel.
gardinie2014 Friendgardinie2014
- Join date:
- December 2014
- Posts:
- 35
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 3
- Thanked:
- 5 times in 2 posts
August 17, 2015 at 2:06 am #745593Hi Viet Vu,
Thank you for replying.
I am familiar with Chmod but the question is what SPECIFICALLY must be allowed/permitted.
Since the site is coming up correctly the [ROOT]/t3-assets folder is accessible BUT Google PageSpeed Checker still claims that the site isn’t gzipping all that it needs to be:
“Compressing resources with gzip or deflate can reduce the number of bytes sent over the network.
Compressing http://www.gardinie.com/t3-assets/js/js-b675e.js?t=378 could save 232.9KiB (70% reduction).
etc”
as well as YSlow which also claims it’s not working.
as an example, yet http://www.gziptest.com and http://checkgzipcompression.com/ and a few others say that it’s enabled and working.
There are 12 un-‘gzipped’ files of which 6 are in the t3asset folder…
Any further help would be greatly appreciated.
Cheers,
Emmanuel.
jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
August 17, 2015 at 2:17 am #662251Hi there
Please try with this document
http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/
Thank you,
Viet Vujooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
August 17, 2015 at 2:17 am #745594Hi there
Please try with this document
http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/
Thank you,
Viet Vu -
AuthorPosts
This topic contains 13 replies, has 5 voices, and was last updated by jooservices 9 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum