₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,614 members, 8,512,773 topics. Date: Wednesday, 04 November 2026 at 12:14 AM

Toggle theme

How Redirect To Maintenance Mode Page Using Php - Webmasters - Nairaland

Nairaland Forum › Science/Technology › Webmasters › How Redirect To Maintenance Mode Page Using Php (415 Views)

1 Reply (Go Down)

How Redirect To Maintenance Mode Page Using Php by Marthynx10(op): 6:51pm On Apr 06, 2021
Good evening everyone.

Please how do I redirect website visitors to a Maintenance Page using php? I am currently working on the website and I don't want visitors to be able to visit it until I am done.

Thank you all.
Re: How Redirect To Maintenance Mode Page Using Php by losprince(m): 6:57pm On Apr 06, 2021
Marthynx10:
Good evening everyone.

Please how do I redirect website visitors to a Maintenance Page using php? I am currently working on the website and I don't want visitors to be able to visit it until I am done.

Thank you all.
Are you using just vanilla PHP or a framework?
Re: How Redirect To Maintenance Mode Page Using Php by Alejoas(m): 7:01pm On Apr 06, 2021
I hail all the hardworking guru here. Call me for powerbank for laptop, between ten to twenty four hours guaranteed!
Re: How Redirect To Maintenance Mode Page Using Php by dochenaj: 7:46pm On Apr 06, 2021
Marthynx10:
Good evening everyone.

Please how do I redirect website visitors to a Maintenance Page using php? I am currently working on the website and I don't want visitors to be able to visit it until I am done.

Thank you all.
Add a redirect header with the location set to the page you want to redirect to.

header("Location: http://new_page")
exit()

Google is always the best way to get these answers. Stackoverflow is very helpful.
Re: How Redirect To Maintenance Mode Page Using Php by Marthynx10(op): 8:13pm On Apr 06, 2021
Vanilla PHP
losprince:
Are you using just vanilla PHP or a framework?
Re: How Redirect To Maintenance Mode Page Using Php by Marthynx10(op): 8:14pm On Apr 06, 2021
Thank you sir. I will give it a try.
dochenaj:
Add a redirect header with the location set to the page you want to redirect to.

header("Location: http://new_page")
exit()

Google is always the best way to get these answers. Stackoverflow is very helpful.
Re: How Redirect To Maintenance Mode Page Using Php by losprince(m): 8:35pm On Apr 06, 2021
Marthynx10:
Vanilla PHP
You shouldn't be working on a production site, by the way, work on it locally and then push to production when ready, but seeing as that is the case, like someone said the way to redirect a site visitor in PHP is with the header() function.

Google it and learn more about how to use it.
Re: How Redirect To Maintenance Mode Page Using Php by Marthynx10(op): 8:41am On Apr 07, 2021
Thank you very much.
losprince:
You shouldn't be working on a production site, by the way, work on it locally and then push to production when ready, but seeing as that is the case, like someone said the way to redirect a site visitor in PHP is with the header() function.

Google it and learn more about how to use it.
1 Reply

Fixing Wordpress Stuck In Maintenance Mode • How To Fix Wordpress Website Stuck In Maintenance Mode • Noticed Nairaland Redirect To Topbrowsernews • 2 • 3 • 4

Please I Need Help About My Blog • Hostlag Acquires Pragmarhost • Paystack Business Account Was Closed