Zend Framework - removing /index/ from URLs
Posted on 2008-06-11
Sorry if this is a simple question, but I'm just getting my feet wet with Zend Framework (7 years exp. with PHP itself, but ZF is new to me) and I'd like to avoid having to create separate controllers for every page on the site, if I can help it. I'd prefer to have each page (account, reports, etc.) expressed as an action in the indexController, and then handle all the business logic in individual models. 30+ controllers that contain nothing but an indexAction() method sort of seems like a waste of time and code.
In short, I want URLs formatted as "[hostname]/account/" rather than "[hostname]/index/account/", etc., without having to actually create a separate controller for account.
Is this possible? Any ZF gurus out there? Is there a way to, say, tell the framework to use the first URL param as an action of the IndexController if no corresponding controller name is found?
Am I making sense, or should I have gotten some sleep before posting this? ;)