Create index.php on ZF2 root directory and add the following content:
<?php
|
|
define('REMOVE_PUBLIC_FROM_URL', true); |
|
include 'public/index.php'; |
Create .htaccess on ZF2 root directory and add the following content:
SetEnv APPLICATION_ENV development |
|
RewriteEngine On |
|
RewriteRule .* index.php |
Finally, add this conditional statement in the top of your layout.phtml file:
<?php
|
|
if (defined('REMOVE_PUBLIC_FROM_URL')) { |
|
$this->plugin('basePath')->setBasePath($this->basePath().'/public'); |
|
} ?> |