title: Css not loading in YII2
body: <p>I implemented pretty URLs in YII2, everything worked fine before implementation, but now loads the styles of my app. Can I lend a hand please? </p>
  
  <p>My manin.php</p>
  
  <pre><code>'urlManager' =&gt; [
          'class' =&gt; 'yii\web\UrlManager',
          'enablePrettyUrl' =&gt; true,
          'showScriptName' =&gt; false,
          'rules' =&gt; [
              '&lt;alias:index|login|logout|contact|about|signup|request-password-reset|reset-password&gt;' =&gt; 'site/&lt;alias&gt;',
              '&lt;alias:index|create|confirm|confirmation|update|delete&gt;' =&gt; 'user/&lt;alias&gt;',
          ],
      ],
  </code></pre>
  
  <p>Request.php</p>
  
  <pre><code>&lt;?php
  namespace common\components;
  class Request extends \yii\web\Request {
      public $web;
      public $adminUrl;
  
      public function getBaseUrl(){
          return str_replace($this-&gt;web, "", parent::getBaseUrl()) . $this-&gt;adminUrl;
      }
  
  
  /*
      If you don't have this function, the admin site will 404 if you leave off
      the trailing slash.
  
      E.g.:
  
      Wouldn't work:
      site.com/admin
  
      Would work:
      site.com/admin/
  
      Using this function, both will work.
  */
  public function resolvePathInfo(){
      if($this-&gt;getUrl() === $this-&gt;adminUrl){
          return "";
          }else{
              return parent::resolvePathInfo();
          }
      }
  }
  </code></pre>
  
  <p>.htaccess</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  Options +FollowSymlinks
  RewriteEngine On
  &lt;/IfModule&gt;
  
      &lt;IfModule mod_rewrite.c&gt;
      RewriteCond %{REQUEST_URI} ^/(admin)
  RewriteRule ^admin/assets/(.*)$ backend/web/assets/$1 [L]
  RewriteRule ^admin/css/(.*)$ backend/web/css/$1 [L]
  RewriteCond %{REQUEST_URI} !^/backend/web/(assets|css)/
  RewriteCond %{REQUEST_URI} ^/(admin)
  RewriteRule ^.*$ backend/web/index.php [L]
  RewriteCond %{REQUEST_URI} ^/(assets|css)
  RewriteRule ^assets/(.*)$ frontend/web/assets/$1 [L]
  RewriteRule ^css/(.*)$ frontend/web/css/$1 [L]
  RewriteCond %{REQUEST_URI} !^/(frontend|backend)/web/(assets|css)/
  RewriteCond %{REQUEST_URI} !index.php
  
  
   RewriteCond %{REQUEST_FILENAME} !-f [OR]
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^.*$ frontend/web/index.php
  &lt;/IfModule&gt;
  </code></pre>