Forum Moderators: phranque

Message Too Old, No Replies

htaccess redirect to a temporary page

display work in progress temporary page

         

NickBelgium

10:59 am on Dec 24, 2006 (gmt 0)

10+ Year Member



Hello,

Whenever a huge site update is required I need to place a temporary page with: "Just a moment please, site is being updated, check back later..." sort of thing.

Because I cannot just redirect 301 ALL the pages to this page in my .htaccess I was wondering how I can solve this issue.

The reason why I cannot do a 301? All the pages would look the same. This is no problem for the human visitors. But for search engine robots that WILL make a problem. It looks like duplicate content and thus urls will be dropped from their index or spampoints will be given.

So how do I inform the searchengines that they have to come back later for indexing because of maintenance?

cmarshall

1:27 pm on Dec 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This sounds like a question that might be more productive in one of the SEO forms. I'm not trying to get rid of you, but I noticed the sound of crickets in response to your post.

I don't have an answer, other than a "blunt instrument" approach of using a repeated "placeholder" page.

Span

2:19 pm on Dec 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



RewriteEngine on
# optionally exclude your own IP from being redirected
# RewriteCond %{REMOTE_ADDR} !^123\.45\.67\.89
RewriteCond %{REQUEST_URI} !/maintenance\.html$
RewriteRule ^(.*)$ /maintenance.html [R=503,L]

This serves maintenance.html with a "503 Service Unavailable" status on every request.

[edited by: Span at 2:23 pm (utc) on Dec. 24, 2006]

BillyS

3:24 pm on Dec 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Span - thanks so much for posting this - I'm going to use it too!

Span

9:33 pm on Dec 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are some disadvantages to this... depending on the time of day, the amount of visitors, the frequency that important bots request pages.

- You can tell visitors to check back later, but most of them simply won't. They follow links and if there's no site they're gone forever.
- Assuming bots know what a 503 is (?), they obviously don't read and interpret the "Please come back in an hour or so." on the maintenance page. Bots only see the status code.

So be warned - there is a risk those 503s are getting indexed.

BillyS

11:50 pm on Dec 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>So be warned - there is a risk those 503s are getting indexed.

I'd rather risk getting a 503 indexed than a 404 or start putting up pages with problems until I can fix them.

In fact, my choice for this would be the wee hours when traffic is down in my sector.

DeniseDD

9:13 am on Jan 13, 2007 (gmt 0)

10+ Year Member



Sorry but does this send anyone else but me to a maintainance page?

DeniseDD

10:41 am on Jan 13, 2007 (gmt 0)

10+ Year Member



I just tried putting this in .htaccess:


RewriteEngine on
RewriteCond %{REMOTE_ADDR}!^00\.00\.000\.000
RewriteCond %{REQUEST_URI}!/standby\.html$
RewriteRule ^(.*)$ /standby.html [R=503,L]

(The 0's are where my IP is :))
However it gets me error 500, whats up?