This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
/
htaccess
57 lines (45 loc) · 1.96 KB
/
htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#
# 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. http://www.example.com/store
# 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>
<filesMatch "\\.(css)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>
<filesMatch "\\.(js)$">
Header set Cache-Control "max-age=216000, private"
</filesMatch>
<filesMatch "\\.(html|htm|php)$">
Header set Cache-Control "max-age=1, private, must-revalidate"
</filesMatch>
</ifModule>