Blame view

.htaccess 1.7 KB
1755c393   Yarik   Basic template in...
1
2
3
4
5
6
7
  Options FollowSymLinks
  AddDefaultCharset utf-8
  
  <IfModule mod_rewrite.c>
      RewriteEngine On
  
      #  main rewrite rule for the frontend application
fd7fe18b   Alexey Boroda   -Image Helper ready
8
      RewriteCond %{REQUEST_URI} !^/(backend/web|admin|storage)
1755c393   Yarik   Basic template in...
9
10
11
12
13
14
15
16
17
      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]
  
15b8e84d   Yarik   Different Seo tasks
18
19
20
      RewriteCond %{REQUEST_FILENAME} robots.txt
      RewriteRule . /frontend/web/index.php [L]
  
1755c393   Yarik   Basic template in...
21
      #  a directory or a file of the uploads folder exists, use the request directly
219af3d1   Alexey Boroda   -Image manager ready
22
      RewriteCond %{REQUEST_URI} ^/storage
1755c393   Yarik   Basic template in...
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
      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]
  </IfModule>