Advertisement:

Author Topic: Redirect users who try to view site under maintenance  (Read 1602 times)

Offline albin2009

  • Newbie
  • *
  • Posts: 3
Redirect users who try to view site under maintenance
« on: October 24, 2018, 08:58:30 AM »
Is there anyway to redirect all users trying to view the site, while im building the website?
I wana direct these people to facebook. And I dont really wana use maintenance mode unless there is a way to display a customer page for maintenance.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,498
  • Gender: Male
    • Kindred-999 on GitHub
Re: Redirect users who try to view site under maintenance
« Reply #1 on: October 24, 2018, 09:11:58 AM »
anything is possible, if you know how to code it.

Realistically.... no.   

Just put the board in maintenance and change the maintenance message to match your desired text,
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,600
    • StoryBB/StoryBB on GitHub
Re: Redirect users who try to view site under maintenance
« Reply #2 on: October 24, 2018, 09:37:50 AM »
That’s actually really dangerous because you might find through circumstance that you’re no longer able to get to the login page to login to take it out of maintenance...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline DorianG

  • Newbie
  • *
  • Posts: 1
Re: Redirect users who try to view site under maintenance
« Reply #3 on: November 03, 2018, 10:50:26 AM »
That actually sounds nasty. Cheers for the heads up, Arantor. Just out of curiosity, what do you do in that case?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,600
    • StoryBB/StoryBB on GitHub
Re: Redirect users who try to view site under maintenance
« Reply #4 on: November 03, 2018, 11:05:02 AM »
I don’t redirect people in the first place.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,289
Re: Redirect users who try to view site under maintenance
« Reply #5 on: November 03, 2018, 05:21:24 PM »
If you lock yourself out of maintenance mode, you can reset it in Settings.php.  Change setting back to $maintenance = 0;.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,498
  • Gender: Male
    • Kindred-999 on GitHub
Re: Redirect users who try to view site under maintenance
« Reply #6 on: November 04, 2018, 09:09:49 AM »
depends on if you are doing the redirect, as the OP asked for.... in that case, it is likely that the redirect is taking place outside of SMF and could indeed lock you out of your own site.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.