title: Running Zend Framework from within a folder with .htaccess rules
body: <p>Greetings. Basically, I'm trying to run a Zend Framework application (multiple of them, actually) from within folders -- but without specifying the public directory. I know this sounds dirty but I have my reasons so it's outside the scope of my question.</p>
  
  <p>For example, this may be one of my ZF "installs":<br/>
  <a href="http://www.myurl.com/project1/" rel="nofollow">http://www.myurl.com/project1/</a><br/>
  (Others may be at /project2/, etc.)</p>
  
  <p>I'm using the standard ZF directory structure. I'm also familiar with the various methods of placing an .htaccess in the project folder to redirect traffic to /public/ that is often used for shared hosting environments with Zend Framework -- the problem is that when your project root isn't the base URL, it doesn't seem to work.</p>
  
  <p>Specifically, if I place the following .htaccess file in /project1/</p>
  
  <blockquote>
    <p>RewriteEngine On<br/>
    RewriteRule ^(.*)$ public/$0 [L]</p>
  </blockquote>
  
  <p>I get a ZF error page stating:</p>
  
  <blockquote>
    <p>Invalid controller specified (project1)</p>
  </blockquote>
  
  <p>So it seems to think that the folder name is a controller.</p>
  
  <p>I get the same problem if I use the more lengthy solution explained here:
  <a href="http://www.alberton.info/zend_framework_mod_rewrite_shared_hosting.html" rel="nofollow">http://www.alberton.info/zend_framework_mod_rewrite_shared_hosting.html</a></p>
  
  <p>(Obviously, I replace the paths with paths that contain "my" path, ie. /project1/)</p>
  
  <p>Any help is much appreciated!</p>