I read all the questions posted here and can´t find solution to my problem.
I have windows 7, xampp, apache 2.4, php 5.6, zend framework 2
I created a sample application named Application
This is my .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
My config files looks like this
'translator' => array(
'locale' => 'en_US',
'translation_file_patterns' => array(
array(
'type' => 'gettext',
'base_dir' => __DIR__ . '/../language',
'pattern' => '%s.mo',
),
),
),
'controllers' => array(
'invokables' => array(
'Application\Controller\Login' => 'Application\Controller\LoginController',
'Application\Controller\Index' => 'Application\Controller\IndexController'
),
),
http://localhost:8080/lizziap/ this works
localhost:8080/lizziap/Index this doesnt works
localhost:8080/lizziap/Login this doesnt works
localhost:8080/Index this doesnt works
Page not found. The requested URL could not be matched by routing.
No Exception available
I will really appreciate any help ... THANKS!
This is how config looks now and it works
'router' => array(
'routes' => array(
'login' => array(
'type' => 'segment',
'options' => array(
'route' => '/login[/:action][/:id]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id'=>'[0-9a-zA-Z]*',
),
'defaults' => array(
'controller' => 'Application\Controller\Login',
'action' => 'login',
),
),
),
'home' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => '/',
'defaults' => array(
'controller' => 'Application\Controller\Index',
'action' => 'index',
),
),
),