-
Notifications
You must be signed in to change notification settings - Fork 9
/
.htaccess
70 lines (52 loc) · 2.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#php_value register_globals off
#php_value session.use_trans_sid 1
#php_value arg_separator.output &
DirectoryIndex index.php
AddDefaultCharset UTF-8
Options -Indexes
#php_value session.cookie_lifetime 0
#php_flag magic_quotes_gpc Off
#php_value upload_max_filesize 100M
#php_value post_max_size 100M
#php_flag log_errors on
#php_value error_log sys/logs/php_errors.log
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
</ifModule>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$
RewriteRule ^(.*)$ - [E=BASE:%1]
#RewriteRule ^sys/files/([news|loads|stat]+/.*)$ %{ENV:BASE}/downloads.php?url=$1 [QSA,L]
#RewriteRule ^image/([a-z\+]+/.*)$ %{ENV:BASE}/img.php?url=$1 [QSA,L]
RewriteRule ^image/([news|loads|stat|forum]+/.*)$ img.php?url=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ %{ENV:BASE}/index.php?url=$1 [QSA,L]
</IfModule>
#Error pages
ErrorDocument 500 "server is temporarily not available. <br /> Сервер временно недоступен."
ErrorDocument 404 "Page not found"
ErrorDocument 402 "Permission denied"
ErrorDocument 403 "Permission denied"
ErrorDocument 408 "server is temporarily not available. <br /> Сервер временно недоступен."
ErrorDocument 500 "server is temporarily not available. <br /> Сервер временно недоступен."