Zend Framework 2 real-world application file structure

I just started with ZF2 and I am very confused with the Zend Skeleton Application. In the current situation, URl looks like this:

http://localhost/zf2/public/

And for a module named Application, it looks like this:

http://localhost/zf2/public/Application/

and actions come after the module name. I want to create a CMS with a dashboard admin panel and. And so I want my user url to be as follows:

http://localhost/zf2

and for the administrator like:

http://localhost/zf2/admin/Module Name/Actions

So my question is: how do I create such a URL?

+5
source share
1 answer

The examples of your URLs look like you are confusing the shared directory and controller routes. Usually you should not have a url:

http://localhost/zf2/public/

vhost. , , vhost. URL- :

http://localhost:9000/

http://myapp.local/

PHP 5.4, , PHP 5.4. ( - - 9000 ):

php -S localhost:9000 -t public

- Skeleton URL- ( ) :

http://localhost:9000/some-module/some-controller/some-action

indexAction IndexController Skeleton, :

http://localhost:9000/application/index/index
+1

All Articles