Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Setting cache with htaccess


Eugenios - 9:10 pm on Aug 11, 2004 (gmt 0)


Hello,

I have a number of sites (about 50-60), many of them accessing Amazon AWS with a perl script and others accessing MySQL for static data (read only). One site also performs read and write to MySQL.

Perl scripts are consuming a lot of server resources and would like to cache (on the server side) these pages. I don't care much about data freshness in this case. When Google, msn and other bots cralw my sites, the pages take a long while to load.

I placed this code in the .htaccess file on one site:

ExpiresActive on
<Files foo.cgi>
ExpiresDefault M2240000
</Files>

As far as I understand, this will cache my foo.cgi pages for about 30-40 days.

I also understand that using M in the ExipresDefault I'm requesting that the page is cached in the server, not in the browser.

It worked smoothly, but when I place it on the .htaccess of other sites (in the same server) it won't work.

Just wanted to know what I'm doing wrong. Also I wanted to know if this can make the bots pick cached pages instead of calling the script.

Any input will be of great help

Enrique


Thread source:: http://www.webmasterworld.com/apache/1922.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com