Results 1 to 3 of 3

Will this .htaccess file do any good?

This is a discussion on Will this .htaccess file do any good? within the General Discussion forums, part of the vBulletin SEO Discussion category; I found this on another website. There were minimal explanations for what it does and how. Is this code legit??? ...

  1. #1
    Member
    Real Name
    understated
    Join Date
    Mar 2010
    Posts
    77
    Liked
    0 times

    Question Will this .htaccess file do any good?

    I found this on another website. There were minimal explanations for what it does and how.

    Is this code legit??? Worth doing???

    Code:
    01<ifModule mod_expires.c>02  ExpiresActive  On
    03  ExpiresDefault "access plus 1 seconds"
    04  ExpiresByType  text/html "access plus 1 seconds"
    05  ExpiresByType  image/gif "access plus 2592000 seconds"
    06  ExpiresByType  image/jpeg "access plus 2592000  seconds"
    07  ExpiresByType image/png "access plus 2592000 seconds"
    08  ExpiresByType  text/css "access plus 604800 seconds"
    09  ExpiresByType  text/javascript "access plus 216000  seconds"
    10  ExpiresByType  application/x-javascript "access plus  216000 seconds"
    11</ifModule>
    12<ifModule mod_headers.c>
    13  <filesMatch  "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
    14    Header  set Cache-Control "max-age=259200,  public"
    15  </filesMatch>
    16  <filesMatch  "\\.(css)$">
    17    Header set  Cache-Control "max-age=604800, public"
    18  </filesMatch>
    19  <filesMatch  "\\.(js)$">
    20    Header set  Cache-Control "max-age=21600, private"
    21  </filesMatch>
    22  <filesMatch  "\\.(xml|txt)$">
    23    Header set  Cache-Control "max-age=21600, public,  must-revalidate"
    24  </filesMatch>
    25  <filesMatch  "\\.(html|htm|php)$">
    26    Header  set Cache-Control "max-age=1, private,  must-revalidate"
    27  </filesMatch>
    28</ifModule>
    29<ifModule mod_headers.c>
    30  Header  unset ETag
    31</ifModule>
    32FileETag None
    33<ifModule mod_headers.c>
    34  Header  unset Last-Modified
    35</ifModule>
    Thanks again peeps.

  2. #2
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    This is for mod_expires caching timeouts.

    I've found it to be 50/50. On some servers, it works great. On others, you never see new threads until you do a hard refresh, even if you're only setting the cache for html pages to 1 second.

    Of course, this only works if you have mod_expires compiled into your apache build.

    Note, do NOT put the line numbers in the file (1-35).

  3. #3
    Member
    Real Name
    understated
    Join Date
    Mar 2010
    Posts
    77
    Liked
    0 times
    I'm on lightspeed.

Similar Threads

  1. Tutorial how to make a good robots.txt file
    By Bram in forum General Discussion
    Replies: 41
    Last Post: 04-30-2012, 07:55 PM
  2. vBulletin 3.x .htaccess file
    By VIP in forum Troubleshooting
    Replies: 14
    Last Post: 03-24-2010, 04:15 PM
  3. .htaccess file already there
    By Tkmstr1009 in forum URL Rewrite Settings
    Replies: 5
    Last Post: 12-22-2008, 11:19 PM
  4. htaccess file view
    By tmorr37 in forum Troubleshooting
    Replies: 2
    Last Post: 06-01-2007, 05:20 PM
  5. 3.0 RC 5 htaccess file
    By Richard in forum General Discussion
    Replies: 5
    Last Post: 10-09-2006, 07:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •