Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,230 members, 7,807,764 topics. Date: Wednesday, 24 April 2024 at 06:43 PM

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

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

How To Put Wordpress Website In Maintenance Mode / How To Fix Wordpress Website Stuck In Maintenance Mode / Noticed Nairaland Redirect To Topbrowsernews (2) (3) (4)

(1) (Reply) (Go Down)

How Redirect To Maintenance Mode Page Using Php by Marthynx10(m): 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(m): 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(m): 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(m): 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)

Help Deceptive Site Ahead / Upgrade Your Small Business For Bigger Profits / How To Trade On Astro Africa

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 15
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.