Forum Moderators: phranque

Message Too Old, No Replies

"I'm updating my site" page.

what to do when I want to update my site

         

julian_lp

1:27 pm on Jan 30, 2008 (gmt 0)

10+ Year Member



Hello everyone,

I'm wondering what would be the best approach to deal with the updating procces in my site.

I've a site with nearly 100K pages (music lyrics related), and given that I'm often modifyng the

code (php), I dont want the users watching php-apache error codes if they try to load the pages

while I'm uploading the new files.
For that reason, I'm now using an "I'm updating my page" page, which is redirected every time a

user try to load any page wich belongs to my site (no matter if they load index.php or if they just

got the links from a Search Engine)

My main concern is what Search Engines see under these circumstances (everytime the same page

whereas there were thousand of links before).

What sort of HTML headers should I use to ask search engines they should crawl my site later?

any advice would be appreciated
regards
julian

phranque

10:01 pm on Jan 30, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you should provide a "503 Service Unavailable" HTTP response status code and optionally a Retry-After header.
you should internally rewrite to the maintenance document rather than using an external redirect, which would show a 301 or 302 status to the user agent for the initial request.

surrealillusions

11:08 pm on Jan 30, 2008 (gmt 0)

10+ Year Member



Cant you make a test page to test out the new page before making it live?

That way you save taking the site offline, risk losing visitors and then turning the site back on again.

:)

phranque

2:50 am on Jan 31, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you can put what ever content you like on that page after the status and header.
then request that url to test it in a browser before setting up the RewriteRule for the internal rewrite.

creeking

5:05 pm on Jan 31, 2008 (gmt 0)

10+ Year Member



you're uploading one-page-at-a-time, like by ftp?

so at any time there is only one page (out of 100,000) that is broken?

phranque

10:46 pm on Jan 31, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



i gathered from the OP that there could be a single php script generating 100K pages...

jdMorgan

11:32 pm on Jan 31, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In outline form:
  • Copy the old site to a subirectory.
  • Using mod_rewrite or ISAPI rewrite, internally rewrite all requests to that subdirectory.
  • Test that the old site still works.
  • Put your new stuff in a different subdirectory.
  • Add an exclusion to your rewrite for requests to that subdirectory.
  • Test the new site.
  • Remove the rewrite.

    Zero downtime.

    You can use a subdomain mapped to a subdirectory for testing if you prefer.

    Jim

  • julian_lp

    4:40 am on Feb 1, 2008 (gmt 0)

    10+ Year Member



    excuseme for my long delay.

    My site is mainly a single srcipt (index.php) that generates all the stuff (~100k pages). Search engines have a lot of different links (not 100k yet cause it is a new one) to my site cause I use rewrites everywhere, but in the server is all back index.php.

    I guess I would take the path of either doing a 503 unavailable, or a redirect to a backup site while I upgrade (it's going to take me some time to figure out whether it is possible or not, I often modify the database structure, and therefore the previous version wouldnt work as expected)

    anyway many thanks to everyone
    regards
    julian

    jecasc

    3:45 pm on Feb 1, 2008 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Every time I do a big update on my website I do it like this:

    I create a new directory

    /website_year_month_day

    and upload the whole data. Then I login to the configuration menu of my hosting package and switch the directory for the domain and point it to the new directory.

    I leave the old data up for some time so if I notice after a few hours that something went badly wrong with my update I simply switch back to the old version.