Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zend Framework on shared hosting

I'm new to Zend Framework. I would like to know how to implement zend framework on a shared hosting. Because of the zend framework folder structure all view files are put into the "public" folder.

Suppose

"/" is the main root folder for me and public is like "/public"

so that the url becomes "http://site/public/. .. .bla bla..."

is this correct?

or is there any other method?

i dont have any permission to create a virtual host.

so what to do?

I hope that you understood my question. If not, please ask me.

Thank you!

like image 352
coderex Avatar asked Jul 12 '09 08:07

coderex


People also ask

What is Zend framework used for?

Zend Framework is a collection of professional PHP packages with more than 570 million installations. It can be used to develop web applications and services using PHP 5.6+, and provides 100% object-oriented code using a broad spectrum of language features.

Is Zend Framework an MVC?

Zend\Mvc is a brand new MVC implementation designed from the ground up for Zend Framework 2, focusing on performance and flexibility. The MVC layer is built on top of the following components: Zend\ServiceManager - Zend Framework provides a set of default service definitions set up at Zend\Mvc\Service.

Is Zend Framework Good?

When it comes to PHP frameworks, Zend is counted among the best. Zend Framework offers lots of benefits for creating feature-rich and dynamic web solutions. MVC features and a strong component library have made Zend a popular PHP framework for creating a myriad of web solutions.


1 Answers

i think the best way is to remove the .htaccess from the public directory (Zend Framework Directory structure) , and put it with the following content into your "root" directory :

 
RewriteEngine On

RewriteRule ^.htaccess$ - [F] RewriteCond %{REQUEST_URI} ="" RewriteRule ^.*$ /public/index.php [NC,L]

RewriteCond %{REQUEST_URI} !^/public/.$ RewriteRule ^(.)$ /public/$1 RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^.*$ - [NC,L]

RewriteRule ^public/.*$ /public/index.php [NC,L]

like image 182
opHASnoNAME Avatar answered Sep 28 '22 10:09

opHASnoNAME