Improve website speed with htaccess

Paste into .htaccess file

# BEGIN EXPIRES HEADERS
<FilesMatch “(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css|woff)$”>
ExpiresActive On
ExpiresDefault A2592000
</FilesMatch>
# end EXPIRES HEADERS

# BEING 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
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
# END COMPRESS

Advertisements

Tagged:

2 thoughts on “Improve website speed with htaccess

  1. Felipe November 22, 2014 at 12:54 pm Reply

    I see a lot of interesting posts here, i know writing posts requires a lot of time, but i
    know unlimited source of content for your page ,
    just search in google – rewriter creates an unique article
    in a minute

    Liked by 1 person

  2. raviradadia January 25, 2015 at 6:50 am Reply

    Thanks 🙂

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: