Respuestas de foro creadas

Viendo 1 respuesta (de un total de 1)
  • yo tengo esto en mi htaccess y funciona bien Excepto los elementos externos como google analiticts.js, etc.

    AddDefaultCharset utf-8
    AddCharset utf-8 .html
    AddCharset utf-8 .js
    AddCharset utf-8 .css

    <IfModule mod_headers.c>
    <FilesMatch «.(js|css|xml|gz|html)$»>
    Header append Vary: Accept-Encoding
    </FilesMatch>
    </IfModule>

    # BEGIN GZIP
    <ifmodule mod_deflate.c>
    AddOutputFilterByType DEFLATE image/svg+xml text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
    <filesMatch «\.(css|js|x?html?|php)$»>
    SetOutputFilter DEFLATE
    </filesMatch>
    </ifmodule>
    # END Compress text files

    <ifmodule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A3600
    <filesmatch «\.(jpg|JPG|gif|GIF|png|css|ico|js|webp)$»>
    ExpiresDefault «access plus 7 day»
    </filesmatch>
    </ifmodule>

    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE application/xhtml+xml
    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/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE image/jpeg
    </ifModule>

    # BEGIN EXPIRES
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault «access plus 10 days»
    ExpiresByType text/css «access plus 1 week»
    ExpiresByType text/plain «access plus 1 month»
    ExpiresByType image/gif «access plus 1 month»
    ExpiresByType image/png «access plus 1 month»
    ExpiresByType image/jpeg «access plus 1 month»
    ExpiresByType application/x-javascript «access plus 1 month»
    ExpiresByType application/javascript «access plus 1 week»
    ExpiresByType application/x-icon «access plus 1 year»
    </IfModule>
    # END EXPIRES

    # BEGIN Cache-Control Headers
    <IfModule mod_headers.c>
    SetOutputFilter DEFLATE
    Header unset ETag
    FileETag None
    <FilesMatch «\.(js|css|ico|pdf|jpg|jpeg|png|gif)$»>
    Header set Cache-Control «public»
    Header set Expires «access plus 7 day»
    Header unset Last-Modified
    </FilesMatch>
    </IfModule>

    <IfModule mod_headers.c>
    <FilesMatch «\.(js|css|xml|gz|webp|ico)$»>
    Header append Vary Accept-Encoding
    </FilesMatch>

    <FilesMatch «\.(ico|pdf|flv|jpg|jpeg|txt|css|webp)$»>
    Header set Cache-Control «max-age=2592000, public»
    </FilesMatch>

    <FilesMatch «\.(ico|jpe?g|png|gif|swf)$»>
    Header set Cache-Control «public»
    </FilesMatch>
    <FilesMatch «\.(css)$»>
    Header set Cache-Control «max-age=604800, public, must-revalidate»
    </FilesMatch>
    <FilesMatch «\.(js)$»>
    Header set Cache-Control «max-age=604800, private, must-revalidate»
    </FilesMatch>
    <FilesMatch «\.(x?html?|php)$»>
    Header set Cache-Control «private, must-revalidate»
    </FilesMatch>
    </IfModule>
    # END Cache-Control Headers

    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
    <IfModule mod_headers.c>
    Header append Vary User-Agent env=!dont-vary
    </IfModule>
    AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
    <IfModule mod_mime.c>
    # DEFLATE by extension
    AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
    </IfModule>
    # END W3TC Browser Cache
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

Viendo 1 respuesta (de un total de 1)