Htaccess Changes Not Taking Effect


#1

Hello,
I’m trying to make changes per the recommendations of YSlow, and add directives to enable GZip compression, Far Future Headers, and disable ETags.

I’ve edited my htaccess file with the following directives, but they don’t seem to be taking effect.

DreamHost support says this is because these directives are not supported and suggested I ask the community.

Anyone have this working? Any suggestions?

Thanks!

#gzip
AddOutputFilterByType DEFLATE text/html text/plain text/xml
text/javascript text/css

#remove etag
FileETag none

#add far future expiration for images
<FilesMatch “.(ico|jpg|jpeg|png|gif|js|css|swf)$”>
ExpiresDefault “access plus 2 hours”


#2

AddOutputFilterByType: Should be application/javascript and application/xml, not text/javascript and text/xml. Otherwise, looks fine (although it’s unnecessary for HTML, for which deflate is enabled by default).

FileETag: Works for me.

FilesMatch/ExpiresDefault: Use this instead:

ExpiresActive On ExpiresByType image/* "access plus 2 hours"


#3

Thanks, that helps! For some reason, I still have a couple of CSS files that YSlow says are not being Gzipped, but it’s much better now. Aside from those files, it seems to be mainly external resources now that are violating YSlow’s rules.

I appreciate the response!