-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.htaccess
47 lines (39 loc) · 1.02 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
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php
# Set the 403 error document to 404.php CHANGE TO 403.PHP WHEN AVAILABLE!!!
ErrorDocument 403 /view/404.php
# Set the 404 error document to 404.php
ErrorDocument 404 /view/404.php
#Forbid access to any file under the following folders
RedirectMatch 403 ^/config/.*$
RedirectMatch 403 ^/setup/.*$
RedirectMatch 403 ^/.github/.*$
RedirectMatch 403 ^/tests/.*$
RedirectMatch 403 ^/.git/.*$
RedirectMatch 403 ^/vendor/.*$
#Forbid access to indivdiual files within the server
<FilesMatch "^\.">
Order allow,deny
Deny from all
</FilesMatch>
<FilesMatch "^README.md">
Order allow,deny
Deny from all
</FilesMatch>
<FilesMatch "^composer.json">
Order allow,deny
Deny from all
</FilesMatch>
<FilesMatch "^composer.lock">
Order allow,deny
Deny from all
</FilesMatch>
<FilesMatch "^config.php">
Order allow,deny
Deny from all
</FilesMatch>
<FilesMatch "^CONTRIBUTING.md">
Order allow,deny
Deny from all
</FilesMatch>