title: Yii2: Separate front and backend in advanced-app doesn't work on XAMPP
body: <p>I simply want to access the backend part via <code>www.domain.com\admin</code> and frontend by <code>www.domain.com</code>. What I did in my root <code>.htaccess</code> is :</p>
  
  <pre><code>Options -Indexes
  # follow symbolic links
  Options FollowSymlinks
  RewriteEngine on
  
  RewriteCond %{REQUEST_URI} ^/admin/$
  RewriteRule ^(admin)/$ /$1 [R=301,L]
  RewriteCond %{REQUEST_URI} ^/admin
  RewriteRule ^admin(/.+)?$ /backend/web/$1 [L,PT]
  
  RewriteCond %{REQUEST_URI} ^.*$
  RewriteRule ^(.*)$ /frontend/web/$1
  </code></pre>
  
  <p>It redirects to the the frontend but doesn't work properly with the backend. Can't realize what is the problem because I am using the same lines of configurations at work and there everything is OK. Can it be because of the <code>XAMPP</code>? We work on <code>Ubuntu</code> and <code>Apache</code> server at my workplace. This is the frontend and backend ( they are similar ) also :</p>
  
  <pre><code>AddDefaultCharset utf-8
  
  Options +FollowSymLinks
  IndexIgnore */*
  RewriteEngine on
  
  
  # Make the backend accessible via url: http://site/admin
  RewriteRule ^admin$ $admin.php [L]
  
  # if a directory or a file exists, use it directly
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  
  # otherwise forward it to index.php
  RewriteRule . index.php
  
  
  RewriteRule ^static - [L]
  </code></pre>
  
  <p><em>EDIT: I DID IT!</em>
  What I was set in my <code>httpd-vhost.conf</code> was :</p>
  
  <pre><code>&lt;VirtualHost *:8080&gt;
      ServerName fitness
      DocumentRoot "c:/xampp/htdocs/fitness/frontend/web"
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>And the problem was that I was redirecting my request to the <code>frontend/web</code> <code>htaccess</code> but what I really needed was the root <code>.htaccess</code>. So I had changed the <code>DocumentRoot</code> to <code>c:/xampp/htdocs/fitness</code>. </p>