This repository has been archived by the owner on Jan 16, 2019. It is now read-only.
/
.htaccess
49 lines (42 loc) · 1.53 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
# Protect password file
<Files .ht*>
deny from all
</Files>
# Redirect to main domain and force www
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.komunumo.org [NC]
RewriteRule ^(.*)$ https://www.komunumo.org/$1 [R=permanent,L]
</IfModule>
# Force HTTPS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.komunumo\.org [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.komunumo.org/$1 [R=permanent,L]
</IfModule>
# Enable GZIP compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</IfModule>
# Enable/allow client side caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 day"
ExpiresByType text/plain "access plus 1 day"
ExpiresByType text/html "access plus 1 day"
ExpiresByType text/css "access plus 1 week"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-icon "access plus 1 month"
</IfModule>
# Force charset utf-8
AddDefaultCharset utf-8
# No directory listings
Options -Indexes
# Shock Teenage Gangsters with Wordpress Redirect
Redirect permanent /wp-config.php http://svr.gov.ru/
Redirect permanent /wp-admin(.*) http://svr.gov.ru/