forked from rvolz/BicBucStriim
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.htaccess
52 lines (45 loc) · 1.33 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
<IfModule mod_rewrite.c>
Options -MultiViews
# Tell PHP that the mod_rewrite module is ENABLED.
SetEnv HTTP_MOD_REWRITE On
# Tell BicBucStriim to enable debug mode - see .env.example file
# SetEnv BBS_DEBUG_MODE 1
# Tell BicBucStriim to enable basic json api - see .env.example file
# SetEnv BBS_HAS_API 1
RewriteEngine On
#RewriteBase /bbs
RewriteRule ^index\.php/((img|js|style)/.*)$ $1 [L]
RewriteRule ^index\.php/(data/(titles|authors)/.*\.png)$ $1 [L]
RewriteRule ^templates/.+\.twig$ - [F]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.*)$ index.php [QSA,L]
RewriteRule ^ index.php [QSA,L]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
# protect database
<FilesMatch data.db>
# Apache < 2.3
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
Satisfy All
</IfModule>
# Apache ≥ 2.3
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</FilesMatch>
# protect schema
<FilesMatch schema.sql>
# Apache < 2.3
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
Satisfy All
</IfModule>
# Apache ≥ 2.3
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</FilesMatch>