Fetching contributors…
Cannot retrieve contributors at this time
58 lines (45 sloc) 1.96 KB
# Copyright (c) 2005-2009 Xsilva Systems Inc. All rights reserved.
# This file controls search engine friendly urls and redirection
# NOTE: This file must be renamed to .htaccess (adding a period in front of the filename) to be operational.
# This file is supplied without the dot in the filename since adding this hides the file within the DMG or Zip file.
# IMPORTANT: If you have Web Store installed in a subfolder, i.e.
# change RewriteBase to include the subfolder name such as: RewriteBase /store
Options -MultiViews
RewriteEngine On
RewriteBase /
Options +FollowSymLinks
# If you have additional files or folders in your web store folder, you may need to add them to the following RewriteCond so they are excluded
# from Web Store processing
RewriteCond $1 !^(index\.php|docs|soap\.php|test\.php|assets|photos|images|themes|css|js|favicon\.ico|robots\.txt)
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
# block all templates (no reason to have these exposed)
RedirectMatch 410 ^/.*\.tpl$
# block all .log (log files), .sql (sql dump/export) and .conf (config files) files
# in case some day these files move to another directory
RedirectMatch 410 ^.*\.(sql|log|conf)$
# block any repo folders that may exist
RedirectMatch 404 /\\.(svn|git|gitignore|gitmodules|idea|hg|bzr|cvs)(/|$)
# block runtime folder
RedirectMatch 404 /runtime/
<ifModule mod_headers.c>
<filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=300, public"
<filesMatch "\\.(css)$">
Header set Cache-Control "max-age=604800, public"
<filesMatch "\\.(js)$">
Header set Cache-Control "max-age=216000, private"
<filesMatch "\\.(html|htm|php)$">
Header set Cache-Control "max-age=1, private, must-revalidate"