2016-05-31 16 views
1

Ich versuche, eine höhere Punktzahl für Google Speed ​​Insights zu erhalten. Aber ich habe einige Probleme mit dem mod_deflate. Es ist auf dem Server aktiv und ich füge den Code in die htaccess-Datei ein. Siehe unten. Google erkennt es jedoch nicht. Es hat einen Test auf www.whatsmyip.org/http-compression-test gemacht und dort funktioniert es gut. Ich habe auch versucht, die if-Tags zu verlassen. Aber immer noch das gleiche Problem. Was ich falsch mache?Google Speed ​​Insights erkennt mod_deflate nicht

RewriteEngine On 

# If you install pulse in a sub-folder, some hosts require 
# RewriteBase to be set to that sub-folder name (below) 

# RewriteBase /subfolder/ 


############################################################ 
# RewriteRules for using Pulse with your own template 
############################################################ 

# Uncomment the rules below if you are using your own template 
# If embedding to a page other than blog.php, edit that in the rules below 

# RewriteRule ^blog-page-([^-]*)$ blog.php?page=$1        
# RewriteRule ^blog-([^-]*)+? blog.php?d=$1 [L] 


############################################################# 
# RewriteRules for using the Pulse template engine 
############################################################# 

# If you want to place the blog on a url other than /blog, 
# change the word "blog" in p=blog to the new url in both rules below 

RewriteRule ^blog-page-([^-]*)$ ?page=$1&p=blog [L] 
RewriteRule ^blog-([^-]*)+? ?d=$1&p=blog [L] 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?p=$1 [L] 


# RewriteEngine On 
RewriteCond %{HTTPS} off 
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 



# Deflate Compression by FileType 
<IfModule mod_deflate.c> 
AddOutputFilterByType DEFLATE text/plain 
AddOutputFilterByType DEFLATE text/html 
AddOutputFilterByType DEFLATE text/xml 
AddOutputFilterByType DEFLATE text/css 
AddOutputFilterByType DEFLATE text/javascript 
AddOutputFilterByType DEFLATE application/xml 
AddOutputFilterByType DEFLATE application/xhtml+xml 
AddOutputFilterByType DEFLATE application/rss+xml 
AddOutputFilterByType DEFLATE application/atom_xml 
AddOutputFilterByType DEFLATE application/javascript 
AddOutputFilterByType DEFLATE application/x-javascript 
AddOutputFilterByType DEFLATE application/x-shockwave-flash 
</IfModule> 

# BEGIN Expires-Headers 
<IfModule mod_expires.c> 
ExpiresActive On 
ExpiresDefault "access plus 8 hours" 
ExpiresByType text/html "access plus 8 hours" 
ExpiresByType application/xhtml+xml "access plus 8 hours" 
ExpiresByType image/jpg "access plus 30 days" 
ExpiresByType image/jpeg "access plus 30 days" 
ExpiresByType image/png "access plus 30 days" 
ExpiresByType image/gif "access plus 30 days" 
ExpiresByType image/x-icon "access plus 30 days" 
ExpiresByType application/x-shockwave-flash "access plus 30 days" 
ExpiresByType text/css "access plus 30 days" 
ExpiresByType text/javascript "access plus 30 days" 
ExpiresByType application/x-javascript "access plus 30 days" 
</IfModule> 
# END Expires-Headers 

Antwort

0

mmm Ich habe meine .htaccess:

Dies ist das Web im arbeiten jetzt: 100 Speed ​​Mobile & Desktop 100 UX

https://developers.google.com/speed/pagespeed/insights/?url=hotelpuebloupala.com&tab=mobile

<IfModule mod_deflate.c> 
AddOutputFilterByType DEFLATE text/plain 
AddOutputFilterByType DEFLATE text/html 
AddOutputFilterByType DEFLATE text/xml 
AddOutputFilterByType DEFLATE text/css 
AddOutputFilterByType DEFLATE text/javascript 
AddOutputFilterByType DEFLATE application/xml 
AddOutputFilterByType DEFLATE application/xhtml+xml 
AddOutputFilterByType DEFLATE application/rss+xml 
AddOutputFilterByType DEFLATE application/atom_xml 
AddOutputFilterByType DEFLATE application/javascript 
AddOutputFilterByType DEFLATE application/x-javascript 
AddOutputFilterByType DEFLATE application/x-shockwave-flash 
</IfModule> 

# turns cache on for 1 month 
<IfModule mod_expires.c> 
ExpiresActive On 
ExpiresByType text/css "access plus 1 month" 
ExpiresByType text/javascript "access plus 1 month" 
ExpiresByType text/html "access plus 1 month" 
ExpiresByType application/javascript "access plus 1 month" 
ExpiresByType application/x-javascript "access plus 1 month" 
ExpiresByType application/xhtml-xml "access plus 600 seconds" 
ExpiresByType image/gif "access plus 1 month" 
ExpiresByType image/jpeg "access plus 1 month" 
ExpiresByType image/png "access plus 1 month" 
ExpiresByType image/x-icon "access plus 1 month" 
</IfModule> 

<ifmodule mod_headers.c> 
<filesmatch "\.(ico|jpe?g|png|gif|swf)$"> 
Header set Cache-Control "max-age=2592000, public" 
</filesmatch> 

<filesmatch "\.(css)$"> 
Header set Cache-Control "max-age=604800, public" 
</filesmatch> 

<filesmatch "\.(js)$"> 
Header set Cache-Control "private, max-age=604800" 
</filesmatch> 

<filesmatch "\.(x?html?|php)$"> 
Header set Cache-Control "max-age=600, private, must-revalidate" 
</filesmatch> 

</ifmodule>