WordPress.org

Forums

Help with .htacess file (1 post)

  1. richiesajan
    Member
    Posted 5 years ago #

    Well looking around I found that speeding up your site would help a bit on Google rankings. So I found in YSlow and Page Speed that I need to 'leverage browser caching' and 'enable GZip compression'.

    Fine. Well I know that this is implemented by modifying the .htacess file on my server. Well my .htacess file looks as belows:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    <ifModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/html A7200
    ExpiresByType text/javascript A604800
    ExpiresByType image/gif A2592000
    ExpiresByType image/jpg A2592000
    ExpiresByType image/png A2592000
    ExpiresByType application/x-javascript A2592000
    ExpiresByType text/css A2592000
    ExpiresByType image/x-icon A2592000
    </ifModule>
    
    <ifModule mod_headers.c>
    Header unset Last-Modified
    Header unset ETag
    FileETag MTime Size
    </ifModule>
    
    <IfModule mod_deflate.c>
     AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
     AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
     AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
     AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
     AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
     AddOutputFilterByType DEFLATE font/truetype font/opentype
    </IfModule>
    
    # END WordPress

    After doing it, still YSlow and Page speed say that I've not reached my goals (GZipping and Browser caching). Help!

    I mean is the format of my .htacess file proper. Is there any tutorial I could refer? I also tried the the 'allow only your IP adress on the wp-admin directory' hack as well as the 'Protect your WordPress blog from hotlinking' one, but to no avail. Could anyone give a demo .htacess?

Topic Closed

This topic has been closed to new replies.

About this Topic