title: images in Zend Framework layout
body: <p>I am a bit lost here, solution could be lurking under my nose but I couldn't get, thought of you guys if any one can help.</p>
  
  <p>Here is the problem:
  I have Zend Framework standard file layout:</p>
  
  <pre><code>Project
    -application
       -controllers
       -views 
       -layouts
          -scripts
             -layouts.phtml
    -library
    -public
       -images
       -index.php
  </code></pre>
  
  <p>Now The problem is, I am referencing images in layouts.phtml by just images/logo.gif etc. and same in the controller views /images/arrow.gif</p>
  
  <p>That works fine if the request is simple <a href="http://servername/project/controller" rel="noreferrer">http://servername/project/controller</a></p>
  
  <p>but if the request is more deep like <a href="http://servername/project/controller/index/page/2" rel="noreferrer">http://servername/project/controller/index/page/2</a></p>
  
  <p>the images break theirselves, they clearly can't get the path, what I am noticing is, if I am on later request, the image path will be <a href="http://servername/project/controller/index/page/2/images/logo.gif" rel="noreferrer">http://servername/project/controller/index/page/2/images/logo.gif</a> which is not there, the image is in public/images</p>
  
  <p>My understanding was (and I have googled it a bit as well) framework knows the default public and will route the images to public/images always. However, this is not working. Do I have to add some re-write rule or something? </p>
  
  <p>Can anyone help please? I will be grateful!</p>