another thread!
His response on the "Re: [fw-mvc] OT - Rewrite rule for Zend" thread
is all the clue I needed to answer my question. After updating to
the latest ModRewrite configuration, I have successfully removed all
of my "Old World" support modules on my laptop, and my only holdback
on the live server appears to be a lingering ModRewrite bug in its
older version of Apache. When my Apache is updated, all evidence
seems to show that the new ModRewrite commands will allow me to run
my old code entirely unimpeded by the new ZF support!
You guys are brilliant! Keep up the good work!
Tim Stiles,
WatchMaker
On Sep 28, 2008, at 2:25 PM, Tim Stiles wrote:
> I'm getting pretty comfortable with ZF for new MVC work, and I've
> found a way to incorporate my existing modular CMS code, but I'm
> looking for less intrusive setup.
>
> In the old code, all deliverable pages resided in /html/
> (deliverable support files in /images/, /css/, etc.), while various
> modular support files for the system are Included from within
> folders such as /publish/, /banners/, /events/, etc.
>
> e.g.: A request for /html/home.htm will use PHP's include_once to
> call files such as /publish/publish.php and /event/events.php which
> contain methods that render content.
>
> In a ZF MVC setup, I have a Route configured for "html/*" that
> sends to a Controller which gets the $_SERVER['REQUEST_URI']
> string, verifies that the file actually exists, and then performs a
> PHP include for it within the Controller's View script. The end
> result is that the old systems work transparently under a ZF MVC
> setup, and that lets me easily incorporate new MVC based systems
> (until I can replace the old ones).
>
> The drawback is that I have to duplicate this exact Route/
> Controller code for each "old world" module folders the site runs:
> a new module and controller set up for each of "publish/*", "events/
> *", "banners/*", etc...
>
> Within each of these "old world" support Controllers, there are no
> specific references to files or paths - everything is built off of
> the REQUEST_URI string, so the code is identical, just repeated in
> multiple module setups.
>
> This is tedious to set up, and my gut instinct says that combining
> these multiple Routes may mean faster page delivery, even if it
> does include a regular expression.
>
>
>
> Can these standard Routes be consolidated into a single "Old World
> support" module using Zend_Controller_Router_Route_Regex?
> I've tried using routes such as "(html|publish|events)/(\d+)" and
> "(html|publish|events)/*" with no luck. They don't seem to
> identify the Route properly
>
> Tim Stiles,
> WatchMaker, Icomex.com
>
>
>
没有评论:
发表评论