Should I remove or add something in my .htaccess file?

htaccess file.. Is this ok or I have any errors?

Some of this code where generated by wordpress plugins and I add some lines that i find from some blogs. So what do you think? Should i remove or add something?

        # BEGIN Far Future Expiration Plugin
        <IfModule mod_expires.c>
        ExpiresActive on
        <FilesMatch ".(gif|jpeg|jpg|png|ico|js|css|swf)$">
        ExpiresDefault "access plus 168 hours"
        </FilesMatch>
        </IfModule>
        # END Far Future Expiration Plugin

        #Expires headers configuration added by Speed of Light plugin
        <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresDefault A2592000
        ExpiresByType application/javascript "access plus 7 days"
        ExpiresByType text/javascript "access plus 7 days"
        ExpiresByType text/css "access plus 7 days"
        ExpiresByType image/jpeg "access plus 7 days"
        ExpiresByType image/png "access plus 7 days"
        ExpiresByType image/gif "access plus 7 days"
        ExpiresByType image/ico "access plus 7 days"
        ExpiresByType image/x-icon "access plus 7 days"
        ExpiresByType image/svg+xml "access plus 7 days"
        ExpiresByType image/bmp "access plus 7 days"
        ExpiresByType font/truetype "access plus 7 days"
        ExpiresByType font/opentype  "access plus 7 days"
        ExpiresByType application/x-font-woff "access plus 7 days"
        ExpiresByType application/vnd.ms-fontobject "access plus 7 days"
        </IfModule>
        #End of expires headers configuration

        # 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

        <IfModule mod_deflate.c>
        # Compress HTML, CSS, JavaScript, Text, XML and fonts
        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
        AddType x-font/otf .otf
        AddType x-font/ttf .ttf
        AddType x-font/eot .eot
        AddType x-font/woff .woff
        AddType image/x-icon .ico
        AddType image/png .png
        AddType text/css .css
        AddType image/jpg .jpg

        # 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>

        # 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

        <IfModule mod_deflate.c>
        # Compress HTML, CSS, JavaScript, Text, XML and fonts
        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
        AddType x-font/otf .otf
        AddType x-font/ttf .ttf
        AddType x-font/eot .eot
        AddType x-font/woff .woff
        AddType image/x-icon .ico
        AddType image/png .png
        AddType text/css .css
        AddType image/jpg .jpg

        # 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_gzip.c>
        mod_gzip_on Yes
        mod_gzip_dechunk Yes
        mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
        mod_gzip_item_include handler ^cgi-script$
        mod_gzip_item_include mime ^text/.*
        mod_gzip_item_include mime ^application/x-javascript.*
        mod_gzip_item_exclude mime ^image/.*
        mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
        </ifModule>

        # BEGIN WP Performance Score Booster Settings
        # END WP Performance Score Booster Settings

PS Does it matter that I have the last ifModule with lower i instead of capital I?

Read more here: Should I remove or add something in my .htaccess file?

Leave a Reply

Your email address will not be published. Required fields are marked *