Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
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
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
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
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)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
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
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
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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
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
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
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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Maintenance mode for txp
colak wrote #318695:
I think that this is how it works… Either that or to those who have access to
Presentation>Themes
.
Cool I must test that out I haven’t used themes at all! :)
…………………
I <3 txp
…………………
Offline
Pages: 1