title: .htaccess rewrite parent folder to sub folder
body: <p>how can i redirect from server.ip/~bogo/api/*  to server.ip/~bogo/api/public/*?
  any help please</p>
  
  <p>Here's htacces in api directory </p>
  
  <pre><code>   &lt;IfModule mod_rewrite.c&gt;
      RewriteEngine on
       RewriteRule  ^$ public/    [L]
        RewriteRule  (.*) public/$1 [L]
      &lt;/IfModule&gt;
  </code></pre>
  
  <p>my htacces in public directory </p>
  
  <pre><code> &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>but i got 404 error??</p>