-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
46 lines (33 loc) · 1.46 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
# ------------------------------------------------------------------------------
# BASE APACHE RULES
# ------------------------------------------------------------------------------
Options -MultiViews
RewriteEngine On
RewriteBase /
# ------------------------------------------------------------------------------
# REMOVE TRAILING SLASHES
# ------------------------------------------------------------------------------
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# ------------------------------------------------------------------------------
# STATIC CACHING PROXY
#
# Enable these rules when using static html caching
# to bypass Statamic when a given URL has a cached copy.
# ------------------------------------------------------------------------------
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteRule ^(.*) static/$1/index.html
# ------------------------------------------------------------------------------
# PROTECT SYSTEM DIRECTORIES
#
# Not necessary when running above webroot.
# ------------------------------------------------------------------------------
RewriteRule ^site/(?!themes) - [F,L]
RewriteRule ^local - [F,L]
RewriteRule ^statamic - [F,L]
# ------------------------------------------------------------------------------
# ROUTE THROUGH INDEX.PHP
# ------------------------------------------------------------------------------
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]