I moved all of my legacy files to the view directory of my controller.
 I then added this to the top of my .htaccess
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} ^(.*)php$
        RewriteRule ^(.*)\.php$ index.php?url=/spages/old/$1 [QSA,L]

where Spages is my controller and my legacy files are in
   views/spages/old/
Esentially, Spages is a secure Pages controller with extra logic.  I
copied what I needed from pages_controller (most of it) and added my
extra logic, beforeFilter, etc.  The code from pages controller takes
care of the old files and your extra logic for session authentication
and such is the extra logic.  I have some files that render Excel or
PNG and don't want the layout around it.  So in the controllers
display() method set $this->layout='' for those files.  This is a
pretty quick and dirty way to do it without fighting the framework.

HTH,
david


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to