Un peu radical quand même !
Voici l'arborescence dans Zend Framework 1.12 :
quickstart
|-- application
| |-- Bootstrap.php
| |-- configs
| | `-- application.ini
| |-- controllers
| | |-- ErrorController.php
| | `-- IndexController.php
| |-- models
| `-- views
| |-- helpers
| `-- scripts
| |-- error
| | `-- error.phtml
| `-- index
| `-- index.phtml
|-- library
|-- public
| |-- .htaccess
| `-- index.php
`-- tests
|-- application
| `-- bootstrap.php
|-- library
| `-- bootstrap.php
`-- phpunit.xml
Et voici le vhost qui détermine l'accès à l'application web :
1 2 3 4 5 6 7 8 9 10 11 12 13
| <VirtualHost *:80>
ServerName quickstart.local
DocumentRoot /path/to/quickstart/public
SetEnv APPLICATION_ENV "development"
<Directory /path/to/quickstart/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost> |
On voit que la racine du site est le répertoire "public" qui ne contient que .htaccess et index.php. Tout le reste peut être protégé.
Partager