|
|||
|
Ok the plan is this when someone enters a url like www.mypage.so/about
i want to get redirected to www.mypage.so/index/about so no matter what index is the only controller i dont understand why something like this works for language and module and not for index. Any ideas? |
|
||||
|
americanu197,
I think you haven't understood yet the ZF's way. We can use modules, controllers and actions. Each one has its own propose. I think using this concepts is the best way for most of problems. They help us to make the separation of application's code. But there's some situations we must use another approach. In this case, I suggest you look for custom routes. maybe those threads help you
regards,
__________________
Lucas Mauricio C. e Martins CR Vasco da Gama, my biggest passion! Ajude a Combater o Spam! - Help fighting spam! |
|
|||
|
thanks for the help i understood the framework but i take orders and my boss is pretty old fashion he had me not use any subfolder like public or www and put everything in root and direct automatically to the index controller which is the only one in the site im building now anyway
|
|
||||
|
americanu197,
In your case I see two ways: 1st: put your controllers in the root and say to zf that your controllers are there and use custom routes. For example, when the address begins with mod_, this will be a controller whatever else, it'll be an action. Your site would be like:
2nd: put all your actions in one controller (index). Your site would be like:
regards,
__________________
Lucas Mauricio C. e Martins CR Vasco da Gama, my biggest passion! Ajude a Combater o Spam! - Help fighting spam! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|