Search code examples
phpcodeignitercodeigniter-routing

New pages in CodeIgniter on a big website


I have a website with many scripts written in "pure" PHP, i.e. no specific framework has been used to write the files. Furthermore, all the URLs are custom using .htaccess and specific PHP scripts.

For a smooth transition, I would like to start using CodeIgniter for new pages without disrupting access to the old pages, but all the documentation I've seen on CodeIgniter gives the impression that the whole website (perhaps with a few exceptions) needs to be based on the framework.

Would it be possible to use the framework for single pages here and there while leaving old URLs and code intact?


Solution

  • Short answer, yes.

    You could access the CI framework from a subfolder, for instance, leaving the existing site untouched.

    i.e

    www.site.com/my_new_app/controller/method/
    

    where my_new_app is the renamed application folder.