Maintenance Mode Page

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
Exclusive
Registered User
Posts: 676
Joined: Mon Jun 25, 2018 1:33 pm

Maintenance Mode Page

Post by Exclusive »

Hi all, Is there a way to make a phpBB board redirect to a page (e.g a created maintenance page) when the board is disabled or in maintenance mode?
Use Search Button to get Instant Results | Follow Forum Rules
Avoid Spams in the forum to prevent banning the offending account. | ⟿ Visit My Awesome phpBB Forum! ⬳

Best Web Hosting with 99.9% Uptime! | ✔ Buy Cheap Domain Names
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Maintenance Mode Page

Post by david63 »

I don't think that you can do it within phpBB but you can with .htaccess
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
Exclusive
Registered User
Posts: 676
Joined: Mon Jun 25, 2018 1:33 pm

Re: Maintenance Mode Page

Post by Exclusive »

david63 wrote: Thu Jun 20, 2019 8:18 pm I don't think that you can do it within phpBB but you can with .htaccess
but by doing this I will have to edit the .htaccess file all the time I want to put the board in maintenance mode.
Use Search Button to get Instant Results | Follow Forum Rules
Avoid Spams in the forum to prevent banning the offending account. | ⟿ Visit My Awesome phpBB Forum! ⬳

Best Web Hosting with 99.9% Uptime! | ✔ Buy Cheap Domain Names
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Maintenance Mode Page

Post by david63 »

Exclusive wrote: Thu Jun 20, 2019 8:22 pm but by doing this I will have to edit the .htaccess file all the time I want to put the board in maintenance mode.
How often are you putting your board in maintenance? I doubt I do it more than once a year.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Maintenance Mode Page

Post by </Solidjeuh> »

david63 wrote: Thu Jun 20, 2019 8:18 pm I don't think that you can do it within phpBB but you can with .htaccess
With .htaccess is a bad idea. I used that a few times, and when the maintenance was done I removed the code from .htaccess. But users were still being redirected to the maintenance page. .htaccess is cached in the browser cache.
User avatar
Exclusive
Registered User
Posts: 676
Joined: Mon Jun 25, 2018 1:33 pm

Re: Maintenance Mode Page

Post by Exclusive »

</Solidjeuh> wrote: Thu Jun 20, 2019 8:34 pm With .htaccess is a bad idea. I used that a few times, and when the maintenance was done I removed the code from .htaccess. But users were still being redirected to the maintenance page. .htaccess is cached in the browser cache.
Good, that is why I didn't consider doing that, any other means to achieve this?
Use Search Button to get Instant Results | Follow Forum Rules
Avoid Spams in the forum to prevent banning the offending account. | ⟿ Visit My Awesome phpBB Forum! ⬳

Best Web Hosting with 99.9% Uptime! | ✔ Buy Cheap Domain Names
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5885
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Maintenance Mode Page

Post by thecoalman »

</Solidjeuh> wrote: Thu Jun 20, 2019 8:34 pm But users were still being redirected to the maintenance page. .htaccess is cached in the browser cache.
You used the wrong type of redirect. You need to use status code 307 or even none at all. Even when you are trying to do 301 it's best practice to not include the 301 status until you know it works the way as expected.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
Lumpy Burgertushie
Registered User
Posts: 69224
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Maintenance Mode Page

Post by Lumpy Burgertushie »

what is maintenance mode?

if you are working on the board and you need it to not be used you would normally shut the board down from the admin panel.

when you do that, there is a place for a message to show users when they try to access the board.

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52768
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Maintenance Mode Page

Post by stevemaury »

Yes, as Lumpy said, ACP, Board settings, Disable board, add message.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Maintenance Mode Page

Post by 3Di »

thecoalman wrote: Thu Jun 20, 2019 9:25 pm
</Solidjeuh> wrote: Thu Jun 20, 2019 8:34 pm But users were still being redirected to the maintenance page. .htaccess is cached in the browser cache.
You used the wrong type of redirect. You need to use status code 307 or even none at all. Even when you are trying to do 301 it's best practice to not include the 301 status until you know it works the way as expected.
Correct. I am used to HTTP/1.1 503 header for sites' maintenance, done in PHP.
This way the site will be not indexed while doing that.

https://gist.github.com/3D-I/8fb88dc810 ... 675a4b926f
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Maintenance Mode Page

Post by </Solidjeuh> »

3Di wrote: Thu Jun 20, 2019 10:00 pm
thecoalman wrote: Thu Jun 20, 2019 9:25 pm
</Solidjeuh> wrote: Thu Jun 20, 2019 8:34 pm But users were still being redirected to the maintenance page. .htaccess is cached in the browser cache.
You used the wrong type of redirect. You need to use status code 307 or even none at all. Even when you are trying to do 301 it's best practice to not include the 301 status until you know it works the way as expected.
Correct. I am used to HTTP/1.1 503 header for sites' maintenance, done in PHP.
This way the site will be not indexed while doing that.

https://gist.github.com/3D-I/8fb88dc810 ... 675a4b926f
Yes, but you need to make the redirect via htaccess ? And that is getting cached in the browser.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Maintenance Mode Page

Post by 3Di »

</Solidjeuh> wrote: Thu Jun 20, 2019 11:01 pm Yes, but you need to make the redirect via htaccess ? And that is getting cached in the browser.
No. That's an HTTP header done in PHP.
https://www.php.net/manual/en/function.header.php

You don't have a redirect (which could be added there in PHP though)..
since that's the responsive page they will see till you are finished over there.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5885
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Maintenance Mode Page

Post by thecoalman »

</Solidjeuh> wrote: Thu Jun 20, 2019 11:01 pm Yes, but you need to make the redirect via htaccess ? And that is getting cached in the browser.
When you are using .htaccess you might have something like this:

Code: Select all

Redirect 301 /oldfile.htm http://example.net/newfile.htm
The 301 tells the browser, search engines or whatever that it has been permanently moved and they will cache the response. A 307 is temporarily moved and it will not be cached.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
Post Reply

Return to “[3.2.x] Support Forum”