Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a Perl "maintenance" script to close site for updates?

Status
Not open for further replies.

JoeM6

Programmer
Aug 5, 2000
53
0
0
US
gamecentral.20m.com
I want to close my site for a few hours while I perform some updates, but I dont want anyone viewing the site while the site is being updated. Is there a Perl script that can redirect like every page to a page that says like maintenance in progrss or something? If not, can it be done in PHP? Thanks in advance



JoeM6
JPMJR11@aol.com
 
You can just create a temporary index.html page and place it in your docs directory, then when you've finish put the real index.html back. Thats what I do, although this requires manually uploading via ftp, but at least its graceful.

If you meant to automate this, then it would a bit tricky. Normally you don't allow write access to the docs directory as your site can get hacked that way.

There are others methods to do this, but they generally involve a complex backend system, that would take too long to explain here.

Barbie
Leader of Birmingham Perl Mongers
 
You could write a script that would rename your index.htm to a filename, rename a "Under construction page" as the index.htm ...
Wax on -->
change attributes of files
rename index.htm dummy.htm
rename suspend.htm index.htm
rename dummy.htm suspend.htm
change attributes back again
Wax off-->
change attributes of files
rename suspend.htm dummy.htm
rename index.htm suspend.htm
rename dummy.htm index.htm
change attributes back again


HTH
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top