• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrofitting App to use CodeIgniter

#5
[eluser]sophistry[/eluser]
one requirement that you might be faced with (which i was):

URIs must remain the same between old site and new site. that is, even though CI will be serving the new site, all the same "pages" (static HTML and PHP scripts) need to get called up without any 301 redirects.

so, it may not be sufficient to just rebuild the site with all new URIs and then "cutover" to the new CI site. in my case, few months before i even planned to rebuild the existing site, i dropped in CI at the root of the domain serving all the *new* content. with an htaccess file similar to crafter's, apache checks if an *actual file* exists before handing off control to CI. when i added new URIs for new site capabilities apache determined that there was nothing for it to serve directly and so it called up CI via the index.php rewrite (see crafter's submission above).

as MW says, that lets you keep serving the static pages without CI involved.

in my case, i needed to migrate all of the HTML and PHP pages *without changing the static pages at all* AND *without building a bunch of CI cruft (controllers and views) around them*. it almost worked like that; only a few things had to change in the static pages once i put them behind my "pages" module/controller.

i think this is going to be a central project of a lot of new CI coders as they figure out how to use CI and then want to convert old stuff to live in CI-land!

let us know how it goes.


Messages In This Thread
Retrofitting App to use CodeIgniter - by El Forum - 09-12-2008, 09:25 AM
Retrofitting App to use CodeIgniter - by El Forum - 09-12-2008, 11:37 AM
Retrofitting App to use CodeIgniter - by El Forum - 09-15-2008, 04:12 AM
Retrofitting App to use CodeIgniter - by El Forum - 09-15-2008, 04:27 AM
Retrofitting App to use CodeIgniter - by El Forum - 09-15-2008, 07:56 AM
Retrofitting App to use CodeIgniter - by El Forum - 09-16-2008, 07:01 AM
Retrofitting App to use CodeIgniter - by El Forum - 09-16-2008, 11:43 AM
Retrofitting App to use CodeIgniter - by El Forum - 09-16-2008, 12:09 PM
Retrofitting App to use CodeIgniter - by El Forum - 09-16-2008, 02:13 PM
Retrofitting App to use CodeIgniter - by El Forum - 09-17-2008, 01:37 PM
Retrofitting App to use CodeIgniter - by El Forum - 09-17-2008, 07:32 PM
Retrofitting App to use CodeIgniter - by El Forum - 09-18-2008, 10:08 AM
Retrofitting App to use CodeIgniter - by El Forum - 09-18-2008, 12:19 PM
Retrofitting App to use CodeIgniter - by El Forum - 09-18-2008, 12:30 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.