.htaccess modification

chilik.doriva

New member
Joined
May 5, 2010
Messages
2
Hi everybody,
I'm trying to modify the .htaccess file to have expiration dates in my headers, the .htaccess file is inside the cgi-bin directory and I'm adding this to it:
#####################################################
# CONFIGURE media caching
#
Header unset ETag
FileETag None
<FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$">
Header unset Last-Modified
Header set Expires "access plus 180 days"
Header set Cache-Control "public, no-transform"
</FilesMatch>
#
#####################################################

or this:

Options -Indexes
# enable expirations
ExpiresActive On
# Set default expiry to one month after last access
#ExpiresDefault "access plus 30 days"
# Set expiry for file types to 14 days
ExpiresByType text/css "access plus 60 days"
ExpiresByType image/gif "access plus 30 days"
ExpiresByType image/jpg "access plus 30 days"

:( But nothing seems to change according to speed tool of fire bug.

I even tried to move the file to the public_html directory, but than I got a 500 error page when I typed my url without the /index.html

Can you Please Help on this?
Chilik
 
This isn't an Admin Level Difficulty; it's about html, not about DirectAdmin. So I've moved the thread.

I'm a fairly decent server administrator, but I'm not an expert at html and httpd, so I may not have all the answers ... but ...

The .htaccess file already in cgi-bin works only for the cgi-bin directories, and for directories and paths inside the cgi-bin directory.

You're right in that your .htaccess file, to turn on expiration for all your files, needs to be in your public_html directory. I don't know why it's not working; you may want to look up all the options you're using to see which one may be causing the problem. Also checking the domain level apache error log may be helpful.

Jeff
 
Back
Top