Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-07-10 12:44:08

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 193
Website

Maintenance mode for txp

Just wanted to say I have a really handy way of using htaccess to create a maintenance mode without using a plugin, I find it so handy. Code at github https://github.com/hilaryquinn/maintenance-page

You can leave your own ip be the only one that can see the live site using .htaccess

RewriteEngine On
RewriteCond %{REMOTE_ADDR} !=00.000.000.0
RewriteCond %{REQUEST_URI} !/maintenance/index\.html$ [NC]
RewriteCond %{REQUEST_URI} !\.(jpg|jpeg|png|gif|css|ico)$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/maintenance/index.html [R=302,L]

The template just has a blue gradient so generic enough you can use it for any site (also mobile friendly), you could put the clients logo instead of my image to be extra fancy ;)

https://github.com/hilaryquinn/maintenance-page


…………………
I <3 txp
…………………

Offline

#2 2019-07-10 15:14:45

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,449
Website

Re: Maintenance mode for txp

hilaryaq wrote #318675:

Just wanted to say I have a really handy way of using htaccess to create a maintenance mode without using a plugin, I find it so handy. Code at github https://github.com/hilaryquinn/maintenance-page

You can leave your own ip be the only one that can see the live site using .htaccess

RewriteEngine On...

The template just has a blue gradient so generic enough you can use it for any site (also mobile friendly), you could put the clients logo instead of my image to be extra fancy ;)

https://github.com/hilaryquinn/maintenance-page

cool! and thx for this


…. texted postive

Offline

#3 2019-07-10 15:50:49

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 193
Website

Re: Maintenance mode for txp

bici wrote #318677:

cool! and thx for this

You’re welcome! Much less scary than Drupal or other maintenance modes that can lock you out!! You have full control with this and no cookie business to worry about :)


…………………
I <3 txp
…………………

Offline

#4 2019-07-11 07:46:21

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,653
Website

Re: Maintenance mode for txp

That is kinda cool off course, especially if you are the sole operator around. On the other hand, the Bloke plugin allows for multiple people to see / contribute to the development while the site is in maintenance mode.

But your maintenance page is kinda cool.

hilaryaq wrote #318678:

Much less scary than Drupal or other maintenance modes that can lock you out!!

Drupal really is something of a special kind of hell; wonder what Dante (the Divina Commedia) would have made to that little corner…

Last edited by phiw13 (2019-07-11 07:47:31)

Offline

#5 2019-07-11 10:52:37

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 193
Website

Re: Maintenance mode for txp

phiw13 wrote #318684:

That is kinda cool off course, especially if you are the sole operator around. On the other hand, the Bloke plugin allows for multiple people to see / contribute to the development while the site is in maintenance mode.

But your maintenance page is kinda cool.

Drupal really is something of a special kind of hell; wonder what Dante (the Divina Commedia) would have made to that little corner…

Oh Blokes work is outstanding! Exactly because it’s only myself accessing it it works, I didn’t try any plugin just myself I always prefer doing it myself over a plugin if I can at all, at least then I understand the code behind everything which I like :)


…………………
I <3 txp
…………………

Offline

#6 2019-07-11 10:54:41

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 193
Website

Re: Maintenance mode for txp

phiw13 wrote #318684:

That is kinda cool off course, especially if you are the sole operator around. On the other hand, the Bloke plugin allows for multiple people to see / contribute to the development while the site is in maintenance mode.

But your maintenance page is kinda cool.

Drupal really is something of a special kind of hell; wonder what Dante (the Divina Commedia) would have made to that little corner…

Also something to bear in mind, if Blokes plugin runs off the database I’m not sure, but when upgrading from older versions of php, if php is going from 5 to 7, the older version wont work under 7, the newer version won’t work under 5, so having a manual html page is very handy and not relying on the database for anything while switching versions!


…………………
I <3 txp
…………………

Offline

#7 2019-07-11 10:56:21

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,246
Website

Re: Maintenance mode for txp

Hi Hilary… Nice snippet. Is there a reason though, that you are not using the themes? The default theme could just host your html content and you can then develop/change the site using another theme.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#8 2019-07-11 11:05:31

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 193
Website

Re: Maintenance mode for txp

colak wrote #318689:

Hi Hilary… Nice snippet. Is there a reason though, that you are not using the themes? The default theme could just host your html content and you can then develop/change the site using another theme.

Thanks Yiannis, I found when upgrading from a old version of txp, my new database was incompatible with php5, and the old is incompatible with php7, so the manual page that isn’t stored in a database I found the easiest solution..

Depends on your use for the maintenance page maybe? Your idea would be great for a more straightforward upgrade that both versions are compatible with php7 and it’s more straightforward maybe. Also it’s for a site that all content changed on so a full re-build from scratch on a production server being moved to the live.


…………………
I <3 txp
…………………

Offline

#9 2019-07-11 11:13:46

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 193
Website

Re: Maintenance mode for txp

colak wrote #318689:

Hi Hilary… Nice snippet. Is there a reason though, that you are not using the themes? The default theme could just host your html content and you can then develop/change the site using another theme.

That is a great way to re-design though! Would there be a way to give a preview of the ‘new’ design to logged in users only though?


…………………
I <3 txp
…………………

Offline

#10 2019-07-11 14:59:44

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,246
Website

Re: Maintenance mode for txp

hilaryaq wrote #318691:

That is a great way to re-design though! Would there be a way to give a preview of the ‘new’ design to logged in users only though?

I think that this is how it works… Either that or to those who have access to Presentation>Themes.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

Board footer

Powered by FluxBB