-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
45 lines (41 loc) · 1.28 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
AddDefaultCharset UTF-8
Options -Indexes
RewriteEngine On
# Rule for redirect from www.sitecom to site.com
# If you want to turn on this rule then delete symbol # in two next lines
#RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
#RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !favicon\.ico
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php
# Alternative rule
#RewriteRule ^(.*)$ /index.php
# Deny access
<Files "plugins.dat">
order allow,deny
deny from all
</Files>
<Files "plugin.xml">
order allow,deny
deny from all
</Files>
<Files ~ "\.tpl$">
Order allow,deny
Deny from all
</Files>
<IfModule headers_module>
<FilesMatch "\.gz\.css$">
ForceType "text/css"
Header set Content-Encoding: gzip
# сервер автоматически пытается сжать уже пожатый css-файл.
# Из-за этого файл не может корректно обработаться браузером.
# Отключаем отдачу ответа в gzip
SetEnv no-gzip 1
</FilesMatch>
<FilesMatch "\.gz\.js$">
ForceType "text/javascript"
Header set Content-Encoding: gzip
</FilesMatch>
</IfModule>