I think Diferior need a Maintenance Page wich be activate with a variable or something like that, when the website is in this state, the default main page cannot be accessed, simple but very usefull for online debugging !
Thanks again !
Blog posts: 11
Added downloads: 2 Comments: 18 Forum posts: 573
It's pretty easy to implement: Open index.php and right after <?php add die ( 'Site is undergoing maintenance, please be patient and try again after a minute or two.' );
It's pretty easy to implement: Open index.php and right after <?php add die ( 'Site is undergoing maintenance, please be patient and try again after a minute or two.' );
I think he means to make the front page show that the site is under maintenance, but allow the rest of the site accessible to admins. Or have a separate page with a login, and above the login it will say the sites under maintenance, and only allow admins to log in. I don't know as that will work with „die“ as last I knew that essentially cancels out the entire page, which is great if you're doing something back end, not front end.
stating the session is admin if not then dont load the page show a blank screen with a message or u could build it into the error handler like i have done on my site
say for a function i use
if ($notice !== false && and $maintence !==true) { begin_block(„Notice“);
end_block(); }
here i state that if notice is turned on then show but it also checks to see if maintenance mode is off then i make $maintence global then make it a function like
begin_block(„Site-Maintenance“); print(„Be Back Soon“); end_block();
This Way I Can Keep my site on and let users know its still alive
Thanks again !
Added downloads: 2
Comments: 18
Forum posts: 573
Open index.php and right after <?php add
die ( 'Site is undergoing maintenance, please be patient and try again after a minute or two.' );
Comments: 5
Forum posts: 57
Open index.php and right after <?php add
die ( 'Site is undergoing maintenance, please be patient and try again after a minute or two.' );
I think he means to make the front page show that the site is under maintenance, but allow the rest of the site accessible to admins. Or have a separate page with a login, and above the login it will say the sites under maintenance, and only allow admins to log in. I don't know as that will work with „die“ as last I knew that essentially cancels out the entire page, which is great if you're doing something back end, not front end.
But thanks for the code I will do this for the moment
Insert into .htaccess file :
RewriteEngine On RewriteCond %{REMOTE_ADDR} !12.345.6.789 RewriteRule .* <a href="http://mywebsite.net/maintenance.htm\" rel=\"external\">http://mywebsite.net/maintenance.htm</a> [L]
Replace 12.345.6.789 by your current IP, with that only you can access to your website !
Added downloads: 2
Comments: 18
Forum posts: 573
the correct way of doing this is
stating the session is admin if not then dont load the page show a blank screen with a message or u could build it into the error handler like i have done on my site
say for a function i use
if ($notice !== false && and $maintence !==true)
{
begin_block(„Notice“);
end_block();
}
here i state that if notice is turned on then show but it also checks to see if maintenance mode is off then i make $maintence global then make it a function like
begin_block(„Site-Maintenance“);
print(„Be Back Soon“);
end_block();
This Way I Can Keep my site on and let users know its still alive