0

My url appears to be :

http://test.scampaigns.com/New/index/qwertyui/287

which I want to be :

http://test.scampaigns.com/qwertyui/287

How is this possible?

router.config.php added......

'new' => array(

    'type' => 'segment',
                'options' => array(
                    'route' => '/[/:id][/:pId]',
                    'constraints' => array(
                        'id' => '[a-zA-Z][a-zA-Z0-9_-]*',
                        'pId' => '[0-9]+',
                    ),
                    'defaults' => array(
                        'controller' => 'Application\Controller\New',
                        'action' => 'index',
                    ),
                ),
            ),

controllers.config.php

'controllers' => array(

    'invokables' => array(
            'Application\Controller\New' => 'Application\Controller\NewController'
        ),
    ),
mpacheco
  • 247
  • 2
  • 16

1 Answers1

0

I really did a few projects in Zend, but as I recall, it would be something about routes.

Check this question and answer of StackOverflow, there's a well explanation there and might as well guide you.

Routing in Zend Framework 2

Community
  • 1
  • 1
Kelwen Souza
  • 109
  • 6