title: Zend Framework with htaccess
body: <p>I developed a website using Zend Framework. In order to handle errors, I want to add to the htaccess file the following lines so I can redirect the user to the corresponding every time there is an error.</p>
  
  <pre><code>ErrorDocument 500 /errors/500.html
  ErrorDocument 404 /errors/404.html
  ErrorDocument 403 /errors/403.html
  </code></pre>
  
  <p>so my htaccess file now in the <code>/public</code> folder looks like this:</p>
  
  <pre><code>RewriteEngine on
  # Rewrite rules for Zend Framework
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule .* index.php
  
  # Security: Don't allow browsing of directories
  Options -Indexes
  # PHP settings
  php_flag magic_quotes_gpc off
  php_flag register_globals off
  php_flag short_open_tag on
  
  ErrorDocument 500 /errors/500.html
  ErrorDocument 404 /errors/404.html
  ErrorDocument 403 /errors/403.html
  </code></pre>
  
  <p>However it seems not to work and it doesn't redirect me to any of these pages and instead it displays this classic error page.</p>
  
  <blockquote>
    <p>Server error</p>
    
    <p>The website encountered an error while retrieving
    <a href="http://www.mysite.com/wesgtsgsfd/sgsdf" rel="nofollow">http://www.mysite.com/wesgtsgsfd/sgsdf</a>. It may be down for maintenance
    or configured incorrectly.</p>
    
    <p>Here are some suggestions: Reload this web
    page later. HTTP Error 500 (Internal Server Error): An unexpected
    condition was encountered while the server was attempting to fulfil
    the request.</p>
  </blockquote>
  
  <p>Does anybody have an idea about to fix my htaccess file so Apache can handle the errors properly and redirect them to the error page according to the error type.</p>