Adding mod_deflate to .htaccess file


#1

Hello, I would like to add the Gzip mod_deflate rule to my .htaccess file to help speed up my wordpress install. Since I’ve never touched my .htaccess file before I thought it wise to get confirmation on where to put it.

My .htaccess is:

BEGIN WordPress

RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress

The Gzip mod_deflate rule I want to add is:

#Gzip

AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript

#End Gzip

I’m not sure if I’m suppose to just add the rule to the end of the file, or drop it inside before #END WordPress.

Appreciate your help…


#2

Doesn’t really matter where you put it, but I always put it at the very top.

The comments (lines starting with #) are just there so you can learn what is what. You can actually remove them.


#3

Got it. Thanks for the help