Thread Rating:
  • 4 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
503 for errors
#14
This is a great idea. In my opinion this http code should also send when you close the board. Only 10 min and Google may index dozens of sites which just say that the board is closed...

Ok, this could also done with a plugin that hooks at global_start:

PHP Code:
function offline_header()
{
    global 
$mybb,$current_page;
    
$closed_bypass=array
    (
        
'member.php'=>array
        (
            
'login',
            
'do_login',
            
'logout',
        ),
        
'captcha.php',
    );
    if(
$mybb->settings['boardclosed']==1&&$mybb->usergroup['cancp']!=1&&!in_array($current_page,$closed_bypass)&&(!is_array($closed_bypass[$current_page])||!in_array($mybb->input['action'],$closed_bypass[$current_page])))
    {
        
header('Status: 503 Service Unavailable');
        
header('Retry-After: 600');
    }


But it would be nice to set the time in Admin CP and MyBB sends the 503 header.
Reply


Messages In This Thread
503 for errors - labrocca - 02-14-2010, 02:52 AM
RE: 503 for errors - Lo. - 02-14-2010, 03:05 AM
RE: 503 for errors - frostschutz - 02-14-2010, 04:07 AM
RE: 503 for errors - Dylan M. - 02-14-2010, 07:43 PM
RE: 503 for errors - Lithium - 02-14-2010, 08:51 PM
RE: 503 for errors - labrocca - 02-14-2010, 08:59 PM
RE: 503 for errors - Ryan Gordon - 02-17-2010, 07:42 AM
RE: 503 for errors - Fábio Maia - 02-17-2010, 11:07 AM
RE: 503 for errors - Alex Smith - 02-17-2010, 03:45 PM
RE: 503 for errors - labrocca - 02-17-2010, 05:38 PM
RE: 503 for errors - Fábio Maia - 02-17-2010, 04:37 PM
RE: 503 for errors - Alex Smith - 02-17-2010, 05:52 PM
RE: 503 for errors - Pirata Nervo - 02-18-2010, 10:00 PM
RE: 503 for errors - querschlaeger - 02-19-2010, 10:31 AM
RE: 503 for errors - Jorddan - 02-20-2014, 03:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)