₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,468 members, 8,422,224 topics. Date: Sunday, 07 June 2026 at 09:47 PM

Toggle theme

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

Nairaland ForumScience/TechnologyWebmastersHow Redirect To Maintenance Mode Page Using Php (374 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

How To Put Wordpress Website In Maintenance ModeHow To Fix Wordpress Website Stuck In Maintenance ModeNoticed Nairaland Redirect To Topbrowsernews234

What Are The Types Of Web Hosting?Self Contained Room To LET At Iyana IpajaHow Can Someone Make Money On Social Media