-
Notifications
You must be signed in to change notification settings - Fork 1
/
.htaccess
67 lines (53 loc) · 1.99 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
#
# STANDART htaccess File
#
#
#
# Deny connections from know spammy servers
<Files *>
order allow,deny
allow from all
deny from 130.185.109.226
</Files>
Options +FollowSymLinks
DirectoryIndex index.php
#php_value session.use_trans_sid 0
# Turn on URL rewriting
RewriteEngine On
# Redirect non www. to www.yourdomain.com
# Uncomment in production
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
# SEMALT FUCK YOU
#RewriteCond %{HTTP_REFERER} semalt.com [NC]
#RewriteRule .* – [F]
#RewriteCond %{HTTP_REFERER} semalt.semalt.com [NC]
#RewriteRule .* – [F]
# Installation directory
RewriteBase /Standart/
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Router. Rewrite to ?p=X&m=Y&a=Z&i=W (/X/Y/Z/W)
RewriteRule ^robots.txt$ public/robots.txt
RewriteRule ^humans.txt$ public/humans.txt
RewriteRule ^rss/?$ index.php?p=rss [NC,L]
RewriteRule ^errors/?([a-zA-Z]*)?/?$ index.php?p=errors&m=$1 [NC,L]
RewriteRule ^admin/?([a-zA-Z0-9_]*)?/?([a-zA-Z0-9_-]*)?/?([a-zA-Z0-9-]*)?/?([a-zA-Z0-9-]*)?/?([a-zA-Z0-9-]*)?/?$ index.php?p=admin&m=$1&a=$2&i=$3&z=$4&w=$5
RewriteRule ^([a-zA-Z_]*)/?([a-zA-Z]*)?/?([a-zA-Z0-9_-]*)?/?([a-zA-Z0-9-]*)?/?([a-zA-Z0-9-]*)?/?([a-zA-Z0-9-]*)?/?$ index.php?lang=$1&p=$2&m=$3&a=$4&i=$5&z=$6&w=$7
ErrorDocument 404 /errors/e404
# Activate compression
AddOutputFilterByType DEFLATE text/html text/css application/x-javascript text/plain text/javascript application/javascript application/json
# Deactivate compression for buggy browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Expiration Headers
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType text/css A2592000
ExpiresByType text/javascript A2592000
ExpiresByType application/x-javascript A2592000