Some Tuesday Night P-Funk
Give Me Some of that Free Education - Thanks Berkeley
CakePHP - requirePost() and requireAuth() Security
What great security we have at the Whitehouse.
Some More Job Oppurtunities for February
career jobs headhunter grails java rails charlotte nc
MCSD, SCJP, Linux+, CSM
Oxcite
Charlotte ALT.NET
Matthew Lefevre Wiki Articles
Lefevre Genealogy at matthewlefevre.com Charlotte Jobs Employment Career Recruiters Headhunter Robert Half Ettain Apex Job Recruiter








 RSS  | The Last 15 Posts  | The Complete Entry List

CakePHP - Serving Legacy PHP Applications

2008-09-08 22:03:00
If you'd like to preserve some non-MVC (non-Cake) PHP Applications while also using CakePHP, you can use Apache mod_rewrite to accomplish this.

This example assumes you have a directory named precake that you intend to put all your legacy apps into. This folder is at the same peer level as the standard CakePHP app folder. The legacy apps should reside in their own subfolder. Let's pretend I had legacy app for managing my contacts. I would place this in the path /precake/contacts/. The following code is how you would modify the standard root CakePHP .htaccess file.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^contacts$ precake/contacts/ [L]
RewriteRule ^contacts\/(.*) precake/contacts/$1 [L]
RewriteRule ^$ app/webroot/ [L]
RewriteCond %{REQUEST_URI} !^\/precake\/.*
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>


bookmark with Diggbookmark with StumbleUponbookmark with Technoratibookmark with Redditbookmark with Delicousbookmark with NewsVineDZone Itbookmark with Furl