Custom URL (http://www.mysite.com/de/) problem

1 message Options
Embed this post
Permalink
denadai2

Custom URL (http://www.mysite.com/de/) problem

Reply Threaded More More options
Print post
Permalink
Hi, i've a problem with custom regex route.

I tried this:

$route = new Zend_Controller_Router_Route_Regex(
            '(.+)',
            array(
                'controller' => 'index',
                'action'     => 'view'
            ),
            array(
                1 => 'language'
            ),
            '%s/'
            );
          $router->addRoute('indexlang', $route);


but going to: http://www.mysite.com/de/ it doesn't work. How can i do it?
If i do this: all work with url http://www.mysite.com/de/index.html.

$route = new Zend_Controller_Router_Route_Regex(
            '(.+)/index.html',
            array(
                'controller' => 'index',
                'action'     => 'view'
            ),
            array(
                1 => 'language'
            ),
            '%s/index.html'
            );
$router->addRoute('indexlang', $route);

Help me plz...