![]() |
[Best practice] Maintenance page - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: [Best practice] Maintenance page (/showthread.php?tid=23093) |
[Best practice] Maintenance page - El Forum - 09-30-2009 [eluser]Clooner[/eluser] Before updating a website I always replace the index.php by a maintenance page. After I finished the update I always place the original index.php back again. Because I use mod_rewrite it will always show the maintenance page. I would like to share my maintenance page and maybe make some improvements on this. Maybe someone has suggestions to improve on this. I just center a background image(which contains the message) inside the body to place the message smack in the middle. Code: <?php [Best practice] Maintenance page - El Forum - 09-30-2009 [eluser]n0xie[/eluser] Why not do it like us. In the root have your index.php and your maintenance.php. If you want to do stuff add this line to mod_rewrite at the very top: Code: RewriteRule ^(.*)$ maintenance.php [L] When you're done, just comment it until you need to do another maintenance job... [Best practice] Maintenance page - El Forum - 09-30-2009 [eluser]Clooner[/eluser] [quote author="n0xie" date="1254319089"]Why not do it like us. In the root have your index.php and your maintenance.php. If you want to do stuff add this line to mod_rewrite at the very top: Code: RewriteRule ^(.*)$ maintenance.php [L] When you're done, just comment it until you need to do another maintenance job...[/quote] That is also a good option. I use a slightly extended version of my one click deploy system which automatically replaces the index.php files needed and places it back after the update. So I actually don't need to do anything except sit back and relax ![]() [Best practice] Maintenance page - El Forum - 09-30-2009 [eluser]n0xie[/eluser] [quote author="clooner" date="1254319428"]I use a slightly extended version of my one click deploy system [/quote] That's pretty nice actually [Best practice] Maintenance page - El Forum - 07-23-2014 [eluser]www.sblog.in[/eluser] Example http://www.webtuts.in/display-site-maintenence-message-using-codeigniter/ |