Jump to content

can someone look at my htaccess file to see if correct?


trevorgilligan

Recommended Posts

im looking to make my shop faster. i have put this code together from snippets, can someone check to see it is ok? thanks have a great weekend

 

is this code all ok and do i put it under this line:

 

 

RewriteRule [0-9/]+/[0-9]+\.jpg$ - [F]

# end ~ module watermark section

 

? thank you

 

<IfModule mod_mime.c>
 
 <filesmatch ".html.gz$">
   ForceType text/html
   FileETag None
 </filesmatch>
  AddEncoding gzip .gz
  AddType text/html .gz
 
AddType application/x-javascript .js
AddType text/css .css
</IfModule>
<IfModule mod_deflate.c>
SetEnvIfNoCase Request_URI .gz$ no-gzip
 
AddOutputFilterByType DEFLATE text/css application/x-javascript 
 
text/x-component text/html text/richtext image/svg+xml text/plain 
 
text/xsd text/xsl text/xml image/x-icon application/javascript
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_headers.c>
  Header set Vary "Accept-Encoding, Cookie"
  Header set Cache-Control 'max-age=3600, must-revalidate'
 
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
<ifmodule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/html A3600
</ifmodule>
SetOutputFilter DEFLATE
<IfModule mod_setenvif.c>
SetEnvIfNoCase Request_URI \.(?:rar|zip)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:gif|jpg|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:avi|mov|mp4)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary
</IfModule>
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...