Thanks for the quick reply.  I was thinking about using the "file exists"
method to have it work on top of the current web-site. How did you guys deal
with issues around session management?  Also, is it possible for pages that
are not part of ZF to use modules provided by ZF?

On Thu, Aug 13, 2009 at 2:13 PM, Hector Virgen <djvir...@gmail.com> wrote:

> I've done this before by using .htaccess and a separate index file for the
> ZF portion of the website.
> Basically it works like this:
>
> Generally, all pages are routed to index.php in your original application
> (or maybe visitors hit the pages directly, like signup.php and login.php).
> So the idea is to use .htaccess to route specific requests to a separate
> index file that bootstraps your ZF application, something like zfIndex.php.
>
> So if you create an Auth controller in your ZF app, you can create a
> rewrite rule to rewrite all Auth/* requests to zfIndex.php (instead of
> index.php).
>
> The zfIndex.php file is *not* the same file as the index.php that comes
> with ZF when you create a new application. zfIndex.php is there to change
> the current working directory to the "public" folder of your ZF application,
> and then include the ZF index.php:
>
> // zfIndex.php
> $zfPath = '/path/to/MyZfApp/public';
> cwd($zfPath);
> require_once $zfPath . '/index.php';
>
> From that point on, ZF will load your bootstrap and dispatch the request as
> normal.
>
> --
> Hector
>
>
> On Thu, Aug 13, 2009 at 10:16 AM, akshah123 <akshah...@gmail.com> wrote:
>
>> Hello, At present I have a website that is built using procedural PHP code
>> without any framework. This website is quite large with considerable amount
>> of PHP code (again in procedural style). As the website has grown quite
>> large, I need to introduce Zend framework so that it is easier to maintain
>> and also need code & view separated so that designer can update the design
>> of the site without knowing a lot about PHP. Since Zend Framework supports
>> MVC pattern, it seems like a perfect fit. However, as the website is quite
>> big, it would be ideal if the work on "moving" the code-base to use Zend
>> Framework was going along (without having two web servers setup) with the
>> live website. This way, I can work on parts of the site and move them
>> gradually to use Zend Framework. I imagine this will take some time as I
>> need to not only deal with new Methodology but also convert procedural code
>> into Object Oriented code that is re-usable. I was hoping perhaps someone
>> that has dealt with such a situation can provide some insight. I am looking
>> for any help and welcome any tutorial/article that deals with such a
>> scenario. What's the best approach? What should I watch out for? Thank you
>> for your time. - Ankit.
>> ------------------------------
>> View this message in context: Introducing Zend Framework to existing
>> System/Website<http://www.nabble.com/Introducing-Zend-Framework-to-existing-System-Website-tp24955639p24955639.html>
>> Sent from the Zend Framework mailing list 
>> archive<http://www.nabble.com/Zend-Framework-f15440.html>at Nabble.com.
>>
>
>

Reply via email to