views:

163

answers:

1

I made an .htaccess template; is there anything else that should be added or changed?

# DEFAULTS
ServerSignature Off
AddDefaultCharset UTF-8
DefaultLanguage en-US
SetEnv Europe/Belgrade
SetEnv SERVER_ADMIN [email protected]

# Rewrites
RewriteEngine On
RewriteBase /

# Redirect to WWW
RewriteCond %{HTTP_HOST} ^serpentineseo.com
RewriteRule (.*) http://www.serpentineseo.com/$1 [R=301,L]

# Cache media files
<filesMatch "\.(gif|jpg|jpeg|png|ico|swf|js)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>

<FilesMatch "\.(js|css|pdf|swf)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>

<FilesMatch "\.(html|htm|txt)$">
Header set Cache-Control "max-age=600"
</FilesMatch>

# DONT CACHE
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
Header unset Cache-Control
</FilesMatch>

# Deny access to .htaccess
<Files .htaccess>
order allow,deny
deny from all
</Files>
+1  A: 

Turn Off ETags [1]

FileETag None

ServerTokens Prod, ServerSignature Off [2]

ServerTokens prod
ServerSignature Off

[1]: http://www.askapache.com/htaccess/apache-speed-etags.html Turn off ETags

[2]: http://www.petefreitag.com/item/419.cfm ServerTokens Prod, ServerSignature Off

Mr. Ronald
Thanks, just one question.If ServerSignature Off smacks the software version from being showed why show anything at all with ServerTokens prod ?
purpler
The server version will still be sent in response headers.
Mr. Ronald
tried ServerTokens prod but i get ERROR 500..
purpler
Sorry, ServerTokens can not be used in VirtualHost context. Set it globally.
Mr. Ronald