Welcome Guest, Not a member yet? Register   Sign In
Temporarily Shutting Down CI Site
#1

[eluser]CodeIgniterNewbie[/eluser]
I need to deploy significant changes to my CI site (it involves changes to the database, core code, etc.).

So, during this upgrade, I want to do 2 things:

1. Prevent my users from accessing the site from any of the URLs they may know about
2. Allow me to access the site so I can test to make sure my upgrade didn't break anything

How do I do this? Thanks.
#2

[eluser]Dam1an[/eluser]
The easiest way to do this would be to extract another application folder, put a nice message in the default view, and change index.php to point to that.
As for testing it yourself, create a copy of index.php (give it a really random name to stop anyone coming accross it) and point that to the upgraded app.

Once all is well, either delete the temporary index.php and change the path i the real index, or rename the temp file to index.php and all should be good again
#3

[eluser]CodeIgniterNewbie[/eluser]
OK, I'm still fairly new to CI:

1. What do you mean by "extract another application folder?" Do you suggest I make a copy of the existing application folder to, say, /application2/?

2. How do I change index.php to "point to that?" Right now, I have in my routes a route that points to a default controller.

3. For testing, what is this index.php I need to rename? And how do I point that to my upgraded application?

Will I be running 2 applications on my site while the upgrade is being done? Remember, I don't want anyone using the old application. I'm going to be making changes to the DB. These are breaking changes.
#4

[eluser]glemigh[/eluser]
Only allow your IP Address to access the site in the .htaccess file.

George
#5

[eluser]TWP Marketing[/eluser]
CodeIgniterNewbie
Look for index.php in the root folder of your application. There is only one instance. Open it and see the line that defined your "application" folder name.

Code:
this is the default setting:
$application_folder = "application";

Dam1an is suggesting having two different application folders, one for normal operation and another, very abbreviated, for maintainence operation, it's basically a dummy with only one page to show your users during maintainence ops.

Normal operation would use something like the line shown above in your index.php file. Maintainence mode would require you to point your $application_folder to the maintainence application folder name:
Code:
$application_folder = "application_2";
#6

[eluser]Dam1an[/eluser]
Come to think of it... Why did I evem suggest the whole seperate application :-S
If all you want is a static message saying the site is down for maintenance, a plain old index.php file will do just fine

So the much simpler solution is
1) Rename index.php to something secret, which you will use for testing (you may need to change the index_page in config for URLs to work/update the rule in htaccess)
2) Put in a temporary index.php with the maintenance message

Job done, then revert back to bring the site back online
#7

[eluser]Wuushu[/eluser]
[quote author="glemigh" date="1245718952"]Only allow your IP Address to access the site in the .htaccess file.

George[/quote]

This.
#8

[eluser]Dam1an[/eluser]
[quote author="Wuushu" date="1245720187"][quote author="glemigh" date="1245718952"]Only allow your IP Address to access the site in the .htaccess file.

George[/quote]

This.[/quote]
This what?

Also, if you specify to only allow your IP to access, would it be possible to route any other IPs to a maitenance notice page? Or would they just get an unfriendly error message?




Theme © iAndrew 2016 - Forum software by © MyBB