Help - Search - Members - Calendar
Full Version: Prevent access to ANY part of the site
Hostony Board > General Support > General Support
kingtaco
If i want a user to be unable to access any part of the site while i do critical uploads how can i accomplish this WITHOUT having to do a redirect in every single directory?
MartinB
try protecting the top critical directory with password, from cpanel (if u have linux hosting) and you can put a message in the login dialog saying "SORRY IM UPDATING, COME LATER"... not a clean solution but.... wink.gif
kingtaco
Doesn't work.

CPanel doesn't let me password protect the "public_html" directory.


I need another solution.
Stanly
You can upload temporary index.html file into you public_html directory and nobody will see other content.
kingtaco
no i don't think that's what i'm looking for.

people have pages bookmarked all over.

just because i close the hyperlinks off from the index page, they'll have other pages bookmarked.

other suggestions?
Stanly
You can try to create .htaccess file at your public_html directory with the following code:

CODE
Order Allow,Deny
Deny from all
Allow from xx.xx.xx.xx

where xx.xx.xx.xx is your IP address.
In that case only you will able to see pages.
MartinB
And if you make a little php script and add it in all your pages ?

Some like
CODE
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<?php include("http://riotpix.com/ifupdating.php"); ?>
.........


and you can write a little php ifupdating.php script in your / like

CODE
<?php

$updating=0; //set this value to 1 when you are updating
if ($updating==1)
{
echo '...here a javascript redirection to the "HEY IM  UPDATING COME LATER" page...';
}
?>


Then, when you are updating, you only need set the variable "updating" in the script /ifupdating.php !

blink.gif wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.
IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here