PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

Chris Jones' Blog: Zend Framework .htacess and Multiple Controllers

Note: This article was originally published at PHPDeveloper on 7 September 2010.
PHPDeveloper

Chris Jones has a new post to his Oracle blog today about a situation he found himself in with his recent Zend Framework application. The issue popped up when he tried to use more than just the basic controller.

I've been using NetBeans with Frameworks recently. I had no problem when doing a single controller example in Zend Framework, so I knew everything was installed OK and mod_rewrite was "working" fine. But I would click a URL that should be routed to a second controller and see an error [about the requested URL not being found].

His solution was to add a new line to his .htaccess file so Apache knew where to start the rewrite from (instead of it being relative) - a RewriteBase path.