So you have a script within your document root that you want to have run 
instead of the normal front Controller?

For instance you have

/html/index.php
/html/something.php

and you want to run something.php?
A simple solution is to change your mod_rewrite in your .htaccess:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
 
The conditions say if the filename or directory exists use that file/directory, 
otherwise rewrite like usual.

This is also a much easier way to deal with images, javascript, and css as 
well, so you don't have to write strange rewrite rules or mess with the 
pre-dispatching.

Is that what you meant?
 
Thank you,
Jordan Raub
Systems Adminstrator / Developer
Novatex Solutions
<[EMAIL PROTECTED]>
1.888.NTS.1.SEO 
He that teaches himself hath a fool for his master. -- Benjamin Franklin
Poor is the pupil who does not surpass his master. -- Leonardo da Vinci.

----- Original Message ----
From: YaRo <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, July 13, 2007 3:34:06 PM
Subject: Re: [fw-general] moving existent application on ZF rails


Actually I do know PHP quite well and already understand basics of ZF.

Let me be more specific: What I need is to make Zend Framework to bypass its
usual controller/action/view routines in case controller/action not found
and simply launch script from provided URI e.g. to give back control to
Apache.

For now I have came up with cumbersome solution of catching 'controller not
found' exception on dispatcher->run and then including script from
requestUri. But this just doesn't looks right to me, I'm sure there are
better/proper ways to do it.



Juri Kühn wrote:
> 
> Hi,
> if you want to use ZFs MVC Framework then you should start off with
> the Zend_Controller manual pages:
> http://framework.zend.com/manual/en/zend.controller.html
> 
> If it is a larger project you should take time to get familiar with ZF
> specifics. Its worth the time!
> 
> With regards,
> Juri
> 
> YaRo wrote:
>> We have big (very big) application which was started long time ago when
>> ZF
>> was still in its childhood. Now the issue came up with moving everything
>> under Zend Framework's hood. I would like to proceed slowly, step by
>> step,
>> with releasing portions of code one after another.
> 
>> For example, we have some area, responsible for displaying articles which
>> currenty have only two major actions:
> 
>> 1) displaying last 10 articles (under
>> <application>/articles/index.php )
>> 2) displaying specific article in detail (under
>> <application>/articles/view.php?id=N )
> 
>> Now what I would like to achieve is to introduce ZF's bootstrap routine
>> to
>> handle *only* controllers/ArticlesController.php with two actions:
>> default
>> 'index' (which will show last 10 articles for example) and additional
>> 'show'
>> (will be responsible for showing specific article in details). All other
>> site's areas should be handled by existing scripts as before.
> 
>> So it looks like I need to have some standard/default controller which
>> would
>> simply pass request URI by usual Apache rules and outputs result as
>> needed.
> 
>> Any advice where to dig?
>> Thanks in advance.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/moving-existent-application-on-ZF-rails-tf4073789s16154.html#a11587067
Sent from the Zend Framework mailing list archive at Nabble.com.





Reply via email to