<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Thu, 23 May 2013 20:46:39 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Alexander Netkachev's Blog: 404 error with Zend Framework Front Controller]]></title>
      <guid>http://www.phpdeveloper.org/news/7434</guid>
      <link>http://www.phpdeveloper.org/news/7434</link>
      <description><![CDATA[<p>
<i>Alexander Netkachev</i> has <a href="http://www.alexatnet.com/blog/2/2007/03/14/404-error-with-zend-framework-front-controller">a new post</a> to his blog that talks about a handy method he discovered when using the Zend Framework to help replace the default "invalid controller" message the Framework gives when hitting a location there's no action for.
</p>
<blockquote>
A few days ago I noted a quick but very usefull tip on how to handle the situation when Front Controller is unable to dispatch the request, i.e. how to display 404 error page instead of Zend_Controller_Dispatcher_Exception with message "Invalid controller specified". And it looks like the common solution for this is to create a front controller plugin. The plugin detects whether the request is dispatchable and changes module/controller/action to appropriate action that will handle the request.
</blockquote>
<p>
<a href="http://www.alexatnet.com/blog/2/2007/03/14/404-error-with-zend-framework-front-controller">His solution</a> uses a NoRoute controller to check and see if there is a valid controller for the requested action. If not, it routes them to a custom controller with a nicer error message. For those that want a bit more low level type of solution, he also includes how to modify the framework itself to perform the same action.
</p>]]></description>
      <pubDate>Thu, 15 Mar 2007 09:39:00 -0500</pubDate>
    </item>
  </channel>
</rss>
