close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Site maintenance work

Thread began 7/27/2012 10:25 am by bill3786 | Last modified 8/08/2012 1:43 pm by Jason Byrnes | 3796 views | 15 replies |

bill3786

Site maintenance work

1. If a live site needed to be temporarily suspended for maintenace work, how is this best achieved?

2. Is it possible to carry out the maintenace work and see the results on the live site without it being visible to the public?

Sign in to reply to this post

Jason ByrnesWebAssist

create a temporary index page with a maintenance message on it.

probably the best way to accomplish this would be to use an htaccess rule to allow access to your site to your IP address only, redirect all others to the maintenance announcement page

Sign in to reply to this post

bill3786

Would your suggestion only work for a fixed IP address?

Did some googling on this over the weekend and found this if you didnt have a fixed IP address.

using-htaccess-to-suspend-an-entire-site-while-still-working-on-it/

Would like your comments on this.

Sign in to reply to this post

Jason ByrnesWebAssist

that suggestion should work too.

it relies on setting a cookie named "secret-cookie".

you could create a password protected page on your site, an use Cookies toolkit to create the cookie when you access that page, this way, the cookie can only be set if you are able to login.

Sign in to reply to this post

bill3786

1. Is the "secret cookie" type htaccess rule the only option for a dynamic IP address?

2. Please could you explain further the use of a password protected page system as I presumed there would be no access to the site until the cookie is set. Not quite getting this bit.

Sign in to reply to this post

Jason ByrnesWebAssist

1) I'm sure there are other ways, but that seas the simplest.

2) Before setting the htaccess rule, you will need to have a page you can access to set the cookie.

you wouldn't want this page accessable to anyone so it should use security assist to only allow access if your are logged in.

the work flow for you would be:
-login
-go to the page that sets the cookie
-set the hataccess rule so that others will only see the maintenance page
-after you are done with maintenance, unset the htaccess rule

before the htaccess rule is set, the cookie page would be accessible to anyone unless you password protect it. after you remove the htaccess rule it would also be accessible unless you delete it (but you'll probably want to do site maintenance again, so would need to recreate it), or password protect it.

Sign in to reply to this post

bill3786

Thanks for the explanation.

The article by the-stickman in post 3 talks about setting the cookie in the browser using FireCookie in Firebug therefore:

1. Is a webpage the only way to set the cookie or can it be done using FireCookie using a very long expiry date to keep the cookie in the browser. Then add the rewrite rule permanently to the htaccess file and comment it out when not needed for maintenance.

2. If this can be done in Firefox, is it possible to create the cookie in IE9 which is the preferred browser? If so, how is this done?

3. This seems a simpler method than creating a protected page to set the cookie or am I missing something fundamental here.

Sign in to reply to this post

Jason ByrnesWebAssist

1) To be honest i skimmed the article, i didn't see that they had you creating the cookie using fire cookie. If you use fire cookie, you wont need a web page to create the cookie.

2) I honestly dont know if the cookie can be created using IE or not, this is not my area of expertise.

3) Yes, creating the cookie in Fire Cookie does seam to be simpler, you are correct, again, this is not my area of expertise. using the protected page to create the coolie is one way to skin the cat.... there are bound to be many more...

Sign in to reply to this post

bill3786

Ok, many thanks Jason, I will now be able to set up the "site down for maintenace" function in Firefox.

Does anybody else know if you can set up a cookie in IE9 like you can with FireCookie in Firebug?

Sign in to reply to this post

bill3786

Successfully setup the "site down for maintenance" system described by the-stickman in post 3. I'm using this system because I only have a dynamic ip address. Here it is again:

using-htaccess-to-suspend-an-entire-site-while-still-working-on-it/

After using firecookie to set up the cookie, the site is visible in firefox. Viewing in any other browser correctly shows a maintenance page. When maintenance is finished I just comment out the two lines below.

The only problem is, I cant get the RewriteRule to show my custom maintenance page, it always shows the default (horrible) page. Tried a number of permutations of the Rule line but always the default shows.

These are the two lines in the htaccess file

RewriteCond %{HTTP_COOKIE} !^.*secret-cookie.*$ [NC]
RewriteRule .* maintenance-page.html [NC,L,R=503]

Anybody know why this is happening?

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...