title: CakePHP 3:Router error, htaccess auto redirect webroot/admin/
body: <p>When I enter <code>localhost:3000/admin</code>
  the url redirects to <code>localhost:3000/webroot/admin</code>
  and show error WebrootController not found</p>
  
  <p>But I enter <code>localhost:3000/admin/</code> is correct
  router</p>
  
  <pre><code>Router::prefix('admin', function ($routes) {
      //$routes-&gt;connect('/:controller/:action/*', ['prefix' =&gt; 'admin']);
      $routes-&gt;connect('/', ['controller' =&gt; 'admins', 'action' =&gt; 'index']);
      $routes-&gt;fallbacks('InflectedRoute');
  });
  </code></pre>
  
  <p>htacess:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine on
      RewriteRule    ^$ webroot/    [L]
      RewriteRule    (.*) webroot/$1 [L]
  </code></pre>
  
  <p></p>
  
  <p>My project</p>
  
  <p><img src="https://i.stack.imgur.com/9Ne24.png" alt="enter image description here"></p>