Tweaking .htaccess for website performance on DreamHost

Add expires headers

# Add Proper MIME-Type for Favicon
AddType image/x-icon .ico

# Expires headers
ExpiresActive on
# Set default to 3 days
ExpiresDefault A259200
# Set static content to 2 weeks
<FilesMatch "\.(gif|jpe?g|png|css|js|ico)$">
ExpiresDefault "access plus 2 weeks"

Turn off Etags

# Turn of Etags
Header unset ETag
FileETag None

Enable Gzip

# Enable Gzip
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript

One comment

Leave a Reply

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