Blame view

.htaccess 3.27 KB
f5002842   Eugeny Galkovskiy   first commit
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
  Options FollowSymLinks
  AddDefaultCharset utf-8
  
  <IfModule mod_rewrite.c>
      RewriteEngine On
  
      #  main rewrite rule for the frontend application
      RewriteCond %{REQUEST_URI} !^/(backend/web|admin|storage)
      RewriteRule !^frontend/web /frontend/web%{REQUEST_URI} [L]
  
      #  to the page without a trailing slash (uncomment if necessary)
      #RewriteCond %{REQUEST_URI} ^/admin/$
      #RewriteRule ^(admin)/ /$1 [L,R=301]
      #  main rewrite rule for the backend application
      RewriteCond %{REQUEST_URI} ^/admin
      RewriteRule ^admin(.*) /backend/web/$1 [L]
  
      RewriteCond %{REQUEST_FILENAME} robots.txt
      RewriteRule . /frontend/web/index.php [L]
  
      #  a directory or a file of the uploads folder exists, use the request directly
      RewriteCond %{REQUEST_URI} ^/storage
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      #  forward the request to index.php of grontend app
      RewriteRule . /frontend/web/index.php [L]
  
      #  a directory or a file of the frontend application exists, use the request directly
      RewriteCond %{REQUEST_URI} ^/frontend/web
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      #  forward the request to index.php
      RewriteRule . /frontend/web/index.php [L]
  
      #  a directory or a file of the backend application exists, use the request directly
      RewriteCond %{REQUEST_URI} ^/backend/web
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      #  forward the request to index.php
      RewriteRule . /backend/web/index.php [L]
  
      RewriteCond %{REQUEST_URI} \.(htaccess|htpasswd|svn|git)
      RewriteRule \.(htaccess|htpasswd|svn|git) - [F]
c7e06a33   Timur Kastemirov   gzip
44
45
  </IfModule>
  
9ea63a04   Timur Kastemirov   gzip2
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
  <IfModule mod_deflate.c>
      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
      BrowserMatch ^Mozilla/4 gzip-only-text/html
      BrowserMatch ^Mozilla/4\.0[678] no-gzip
      BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
      Header append Vary User-Agent
      RewriteEngine On
      AddEncoding gzip .gz
      RewriteCond %{HTTP:Accept-encoding} gzip
      RewriteCond %{REQUEST_FILENAME}.gz -f
      RewriteRule ^(.*)$ $1.gz [QSA,L]
eae531ec   Timur Kastemirov   gzip
65
66
67
68
69
  </IfModule>
  
  <IfModule mod_expires.c>
      #  on the module.
      ExpiresActive on
fb9572e7   Timur Kastemirov   caching browser
70
  
eae531ec   Timur Kastemirov   gzip
71
72
73
74
75
76
77
      ExpiresByType image/jpg "access plus 1 month"
      ExpiresByType image/gif "access plus 1 month"
      ExpiresByType image/jpeg "access plus 1 month"
      ExpiresByType image/png "access plus 1 month"
      ExpiresByType image/ico "access plus 1 month"
      ExpiresByType image/x-icon "access plus 1 month"
      ExpiresByType text/html "access plus 600 seconds"
2138dbc4   Timur Kastemirov   cache controll he...
78
79
      ExpiresByType text/javascript "access 1 week"
      ExpiresByType text/css "access 1 week"
fb9572e7   Timur Kastemirov   caching browser
80
      #  the default expiry times.
2138dbc4   Timur Kastemirov   cache controll he...
81
      ExpiresDefault "access plus 1 week"
064efea4   Timur Kastemirov   cache controll he...
82
83
84
85
86
  </IfModule>
  
  < mod_headers.c>
  
      < "\.(css|js)(\?v=\d+)?$">
2138dbc4   Timur Kastemirov   cache controll he...
87
          Header set Cache-Control "max-age=604800, public"
064efea4   Timur Kastemirov   cache controll he...
88
89
90
      </>
  
  </>