Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-25 10:52:40

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 233
Website

Production Status: Closed

Any particular reason this has been omitted? It’s common to have to close sites for initial development, maintenance or upgrading. It’s a messy process when developing in TXP – you have to mess around with htaccess and temporary pages.

Would be very useful if you could define two things:

1. The ‘Closed’ page.
2. A specific URL parameter that lets you view the closed site, i.e. mysite.com?test=password.

You would have to set the password yourself of course, otherwise any TXP user could view your site during development/maintenance.

Offline

#2 2006-09-25 12:35:17

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Production Status: Closed

Production status is about how Textpattern should handle errors and warnings.

Offline

#3 2006-09-25 14:21:34

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Production Status: Closed

The following is not intended to argue against the feature idea, which I think is in general a valid one. I am only mentioning the following because it is actually relatively easy to make a maintenance page as it is:

If you want to disable a site, you can use error-pages within textpattern:

<txp:txp_die msg="Site is temporarily not available, due to maintenance." status="503" />

503 will be the HTTP status code; it is used when the webserver can not respond due to a temporry condition – this is mostly relevant with respect to search-engines/bots, so they don’t think the mainenance page is your new site (instead they wil try to fetch it again later).

The page that is shown will use the page-template error_503 if available, otherswise default to error_default (if that is missing as well, it will show a bare bones internal error page). Inside the page template the tag <txp:error_message /> will show the text that is passed to txp_die as the msg attribute.

If you want some people to be able to still see the actual page instead of the maintenance page, you can use one of the many conditional plugins (those are basically one-liners in PHP), I believe there is one that checks for url-vars.

Offline

#4 2006-09-25 14:31:24

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Production Status: Closed

Since most web servers are configured to serve .html before .php, in the past I would enable an index.html file in the root and the site would be off, at least for visitors hitting the root.

Due to the way Textpattern’s .htaccess works, you’d also have to rename the .htaccess file.

But I agree that a maintenance mode would be a cool feature.

Offline

#5 2006-09-26 00:45:06

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Production Status: Closed

But I agree that a maintenance mode would be a cool feature.

Definitely. I was just pointing out why it is “missing” from the Production Mode setting.

Offline

#6 2006-09-26 15:42:21

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 233
Website

Re: Production Status: Closed

Thanks, I like the fact it deters search engines – will be using this!

Sencer wrote:

The following is not intended to argue against the feature idea, which I think is in general a valid one. I am only mentioning the following because it is actually relatively easy to make a maintenance page as it is:

If you want to disable a site, you can use error-pages within textpattern:

<txp:txp_die msg="Site is temporarily not available, due to maintenance." status="503" />

503 will be the HTTP status code; it is used when the webserver can not respond due to a temporry condition – this is mostly relevant with respect to search-engines/bots, so they don’t think the mainenance page is your new site (instead they wil try to fetch it again later).

The page that is shown will use the page-template error_503 if available, otherswise default to error_default (if that is missing as well, it will show a bare bones internal error page). Inside the page template the tag <txp:error_message /> will show the text that is passed to txp_die as the msg attribute.

If you want some people to be able to still see the actual page instead of the maintenance page, you can use one of the many conditional plugins (those are basically one-liners in PHP), I believe there is one that checks for url-vars.

Offline

Board footer

Powered by FluxBB