Zend Framework on a Shared Host

Posted by manyxcxi on Stack Overflow See other posts from Stack Overflow or by manyxcxi
Published on 2010-06-17T22:06:23Z Indexed on 2010/06/17 22:13 UTC
Read the original article Hit count: 229

I am trying to push my first ZF project to my shared hosting provider. I have done a lot of testing on my home server and everything is working great. My issue is that I do not know how to set up my .htaccess files on the shared hosting provider to make it work correctly. The ZF documentation says to configure my Apache config VirtualServer DocumentRoot to /whatever/path/project-folder/public, but I don't have that kind of access. How do I get around this?

I have seen http://stackoverflow.com/questions/1115547/zend-framework-on-shared-hosting but none of those solutions have worked for me.

My application path looks like this

/
- .htaccess
- /application
...
- /public
-- .htaccess
-- index.php 
-- ...
...

My .htaccess files look like:

/.htaccess

RewriteEngine On
RewriteRule !\.(js|gif|jpg|png|css|txt)$ public/index.php [L]
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ public/$1 [L]

/public/.htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

© Stack Overflow or respective owner

Related posts about apache

Related posts about zend-framework