Welcome Guest, Not a member yet? Register   Sign In
Updating your website with CodeIgniter
#1

[eluser]mikegioia[/eluser]
Hi guys -

I'm about to roll out a new version of my site which now uses codeigniter. I was wondering what the best way to do this was.

Traditionally, I'd throw some htaccess commands in to redirect all requests to an update.html unless it was from my IP.

However, trying to do with codeigniter doesn't seem to be working. I'm using an htaccess redirect to index.php for all page requests but it seems like having two in there is causing some confusion.

If anyone has any experience on updating their site with codeigniter I'd really be interested.

Thanks,
Mike
#2

[eluser]Derek Allard[/eluser]
When my site was running on CI (it uses EE now) I just built it locally until I was happy, then to move live I replaced index.php with index.html (an offline message), FTP'ed my new files up, then removed index.html. If you're looking for a zero-downtime way... I'm not sure a good one (as measured by "worth the hassle" exists). Wink
#3

[eluser]mikegioia[/eluser]
Thanks a lot Derek - that should probably do the trick for my purposes. Do you ever run into problems if someone tries to access another folder or another file on your site though during the update process? My main concern was someone trying to do something (database related) mid way through an update. Its not a huge concern, I was just wondering if there was any official or tested CI solution for it.

Mike
#4

[eluser]Derek Allard[/eluser]
Well, you should be covered there even. The nice thing about CodeIgniter is that everything (everything) runs though the index.php page, so if that isn't there, then nobody will be able to "half access" the site. Plus, the whole update should only take a few seconds, so you're probably fine there.

If it was a big site with millions of visitors, you'd want ot investigate dns tricks to redundant servers or something, but for your average business site, a few seconds of downtime is not usually even noticed.




Theme © iAndrew 2016 - Forum software by © MyBB