views:

17

answers:

1

I am upto making a function for mine website's administrator to put it offline. But site must be some way accessible for administrators or mods.

What way i should do it ?

A: 

Somewhere in the includes:

if($mainstance == 1){
    if(strpos($_SERVER['REQUEST_URI'],'/admin/') === false) die("Site's down");
}

This would make everything but the /admin/ directory inaccessible.

Robus