On 2/25/2010 4:53 AM, MrMastermindNL wrote:
Hi,

I've create a Zend Framework application and I now have to move it to the
webspace of my client. Unfortunately there's already a website running
there. So if I just upload my framework, the site wil not be visible
anymore.

So the question is, how can I upload and test my Zend Framework application
on the webspace of my client, without interferring with the current website?
I don't know your specific setup, but this is what I did:

First, I renamed the file "index.php" to "zf.php". I also changed the reference in the .htaccess file.

Second, I modified the .htaccess file further, so that only certain requests would be handled by my application. This part isn't strictly necessary because the default rewrite rules will only redirect requests for files or directories (or symlinks) that *don't* already exist (meaning your existing pages should still be accessible through the same URL as always). However, this *will* cause Zend Framework to "handle" any broken links. I didn't want that behavior, which is why I took this step.

My modified .htaccess looks something like this:

=====[ .htaccess ]==========
RewriteEngine On

# The following URIs will be handled by ZF.
RewriteCond %{REQUEST_URI} ^/controller [OR]
RewriteCond %{REQUEST_URI} ^/another-controller [OR]
RewriteCond %{REQUEST_URI} ^/module1 [OR]
RewriteCond %{REQUEST_URI} ^/module2/some-controller
RewriteRule ^.*$ zf.php [NC,L]
============================

Hope that helps.

Ryan

Reply via email to