akhil
akhil

Reputation: 119

Remove public folder in zend framework 2

Is there any way to change the default folder structure of zend framework 2? My specific need is to remove/rename public folder. Also, I would like to remove public from URL also. I tried many things using htaccess but nothing works for zend 2.

Upvotes: 2

Views: 345

Answers (1)

Tim Fountain
Tim Fountain

Reputation: 33148

The default folder structure is just a convention, there's nothing particular that relies on it. However, it is a sensible convention, and instead of trying to change it you should probably try and fix the real problem instead.

If public/ is appearing in the URL, either your VirtualHost is not setup correctly or you're using shared hosting and can't change the VirtualHost. The installation instructions have example vhosts for Apache - the key thing is having your document root pointing at the public folder, not the application root.

Upvotes: 4

Related Questions