forked from bibleforge/BibleForge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess.sample
58 lines (51 loc) · 1.81 KB
/
.htaccess.sample
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
58
#
# BibleForge
#
# @date 09-01-09
# @version alpha (α)
# @link http://BibleForge.com
# @license GNU Affero General Public License 3.0 (AGPL-3.0)
# @author BibleForge <info@bibleforge.com>
#
#
# Cache
#
<IfModule mod_headers.c>
Header unset Pragma
# Remove ETags
FileETag None
Header unset ETag
# TODO: Determine if far future expiration dates are a good idea and if they should be applied to Javascript and CSS as well.
# NOTE: With future expiration, we should use include the version in the filename so that the client will download the new files (e.g., main_0.3.1.js).
# Add far future expiration dates to images.
<FilesMatch "\.(ico|jpg|png|gif)$">
Header set Cache-Control "public"
Header set Expires "Mon, 15 Apr 2030 20:00:00 GMT"
# This eliminates If-Modified-Since and If-None-Match requests for speed improvements.
Header unset Last-Modified
</FilesMatch>
# Use ChromeFrame if available
Header set X-UA-Compatible "IE=Edge,chrome=1"
# Remove header for certain file types since it is unncessary.
<FilesMatch "\.(js|css|gif|png|jpe?g|pdf|eot|ttf|otf|woff|ico)$">
Header unset X-UA-Compatible
</FilesMatch>
</IfModule>
#
# Gzip
#
#NOTE: Compression should not be used when being used only on the localhost.
#TODO: The Forge should determine if compression is needed.
<IfModule mod_deflate.c>
<FilesMatch "\.(js|css|php|html|htm)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css application/javascript
#
# Redirects
#
# Hide the .git directory and .gitignore from the client.
#RedirectMatch 404 /\\.git
# Redirect pages to be created on the fly (primarily for browsers without JavaScript).
ErrorDocument 404 /page_creator.php