Ho cancellato tutto e ristabilito questi file:
C:\xampp\apache\conf\extra\httpd-vhosts.conf
C:\Windows\System32\drivers\etc\hosts
Poi ho reinstallato ZF2 con Git e Composer, aggiunto la cartella ‘Users’ in
C:\xampp\htdocs\ZF2\module
ed editato il file seguente:
C:\xampp\htdocs\ZF2\config
in questo modo:
Infine ho spostato il file .htaccess presente in:Codice PHP:
<?php
return array(
// This should be an array of module namespaces used in the application.
'modules' => array(
'Application','Users'
),
//ecc… ecc…
C:\xampp\htdocs\ZF2\public
nella cartella:
C:\xampp\htdocs
Se provo la seconda soluzione (aggiungo index.php in C:\xampp\htdocs e lascio invariato il file .htaccess) quando digito questi link:
http://localhost/ZF2/public/users/index/login
http://localhost/ZF2/public/users
ottengo questo errore:
NOTA: I css è come fossero scomparsi.Zend Framework 2 Skeleton Application
Home
A 404 error occurred
Page not found.
The requested URL could not be matched by routing.
No Exception available
© 2005 - 2015 by Zend Technologies Ltd. All rights reserved.
Se digito:
http://localhost/ZF2/public
invece accedo senza problemi alla home page.
Se provo la prima soluzione e digito:
http://localhost/
accedo alla home page senza problemi ma se scrivo:
http://localhost/ZF2/public/users/index/login
http://localhost/ZF2/public/users
http://localhost/users
ottengo il seguente errore:
Ecco il modulo Users:Oggetto non trovato!
L'URL richiesto non esiste su questo server. Se hai scritto l'URL a mano, per favore controlla che non ci siano errori.
Se pensi che questo sia un errore del server, per favore contatta il webmaster.
Error 404
localhost
Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3
http://www.filedropper.com/users