0
votes

I have two questions for you:

1) I'm developing my website in ZF2, and I want to make a friendly URL like:

domain.com/ADFE4
domain.com/RURUR
domain.com/UYRRTG

with a variable second part. The problem is that ZF2 interpret this second url like a controller. How could I send this url parameter to index action in the index controller?

2) This way to make the site, could be bad for SEO? Not for the friendly url, but the same controller for manage the route.

1

1 Answers

0
votes

try to use router like this:

'friendlyPage' => array(
                'type'    => 'segment',
                'options' => array(
                    'route'    => 'sometext-[:param]',
                    'constraints' => array(
                        'param'   => '[0-9]+',
                    ),
                    'defaults' => array(
                        'controller' => 'ControllerName',
                        'action'     => 'ActionName',
                    ),
                ),
            ),