This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
111 lines (76 loc) · 2.35 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
Options -Indexes
# Deny access to files starting with dot
<FilesMatch "^\.">
Order allow,deny
Deny from all
</FilesMatch>
# Timezone
<IfModule mod_setenvif.c>
SetEnv TZ Europe/Moscow
</IfModule>
ServerSignature Off
AddDefaultCharset UTF-8
php_value default_charset "utf-8"
#==========================| Redirect |==========================
RewriteEngine on
Rewritecond %{HTTP_HOST} !^netschool.npanuhin\.me$
Rewritecond %{HTTP_HOST} !^netschool\.loc$
Rewritecond %{HTTP_HOST} !^192\.168\.[0-9]{0,3}\.[0-9]{0,3}$
RewriteRule ^(.*)$ https://netschool.npanuhin.me/$1 [R=301,L]
#=========================| File types |=========================
AddHandler application/x-httpd-php .html
AddHandler cgi-script .pl .py .jsp .asp .htm .shtml .sh .cgi
AddType application/x-javascript .js
AddType text/css .css
AddType text/xml .xml
AddType application/octet-stream .doc .mov .avi .pdf .xls
# ForceType application/x-httpd-php
AddType video/ogg .ogv
AddType video/ogg .ogg
AddType video/mp4 .mp4
AddType video/webm .webm
AddType application/x-shockwave-flash swf
#============================| PHP |=============================
php_value upload_max_filesize 30M
php_value post_max_size 50M
php_value memory_limit 70M
php_value max_file_uploads 30
# php_value session.gc_maxlifetime 3153600000
php_value session.cookie_lifetime 3153600000
#=====================| HTTP status codes |======================
# ------------4XX------------------
# Bad Request
ErrorDocument 400 /fails/400.html
# Unauthorized
ErrorDocument 401 /fails/401.html
# Forbidden
ErrorDocument 403 /fails/403.html
# Not found
ErrorDocument 404 /fails/404.php
# Method Not Allowed
ErrorDocument 405 /fails/405.html
# Proxy Authentication Required
ErrorDocument 407 /fails/407.html
# Request Timed Out
ErrorDocument 408 /fails/408.html
# Request URI Too Long
ErrorDocument 414 /fails/414.html
# Too Many Requests
ErrorDocument 429 /fails/429.html
# ------------5XX------------------
# Internal Server Error
ErrorDocument 500 /fails/500.html
# Not Implemented
ErrorDocument 501 /fails/501.html
# Bad Gateway
ErrorDocument 502 /fails/502.html
# Service Unavailable
ErrorDocument 503 /fails/503.html
# Gateway Timeout
ErrorDocument 504 /fails/504.html
# Loop Detected
ErrorDocument 508 /fails/508.html
# Unknown Error
# ErrorDocument 520 /fails/520.html
# Connection Timed Out
# ErrorDocument 522 /fails/522.html