Thursday, October 10, 2013

Zend Framework 2.22 : How to remove public folder from URL


We can remove public from URL within 2 Steps :


1.Copy and paste all public folder files and folders into your project root directory.

2.Now make changes on index.php file

chdir(dirname(__DIR__).'/yourwebsiterootfoldername');


Now your ZF2 project start working without public folder reference something like this.

http://localhost/yourwebsiterootfoldername/cms/index