+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: How can I turn off my site temporarily ?

  1. #1
    cerbere is offline x10Hosting Member cerbere is an unknown quantity at this point
    Join Date
    Nov 2007
    Posts
    51

    How can I turn off my site temporarily ?

    When doing maintenance or modifications to my site,
    I'd like to lock it up for a short period (1-4 hours), maybe
    with a page that says "Back at 16:00 h GMT" and
    allows me to enter a password so I can do my testing.

    This is easily done in the public_html/index.htm page,
    but how can I lock the whole site without having to edit
    every page ?

    In other words, I want to flip a SINGLE switch that allows
    only me to access any site page.

    Any suggestions ?

  2. #2
    Sohail's Avatar
    Sohail is offline x10 Spammer Sohail is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    London, UK
    Posts
    3,052

    Re: How can I turn off my site temporarily ?

    Well using the options in the cPanel you can password-protect directories.

  3. #3
    freecrm's Avatar
    freecrm is offline x10 Elder freecrm is an unknown quantity at this point
    Join Date
    May 2008
    Location
    UK
    Posts
    629

    Re: How can I turn off my site temporarily ?

    Check out .htaccess and .htpasswd files that can control access.

    You only have to change one file (.htaccess)

  4. #4
    Sohail's Avatar
    Sohail is offline x10 Spammer Sohail is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    London, UK
    Posts
    3,052

    Re: How can I turn off my site temporarily ?

    Yeah you could do that too..

  5. #5
    Sohail's Avatar
    Sohail is offline x10 Spammer Sohail is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    London, UK
    Posts
    3,052

    Re: How can I turn off my site temporarily ?

    Yeah you could do that too..

  6. #6
    dickey's Avatar
    dickey is offline x10 Sophmore dickey is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    Singapore
    Posts
    128

    Re: How can I turn off my site temporarily ?

    Can you give example of how to do that using .htaccess as I wanted to ask the same question.

  7. #7
    cerbere is offline x10Hosting Member cerbere is an unknown quantity at this point
    Join Date
    Nov 2007
    Posts
    51

    Re: How can I turn off my site temporarily ?

    Yes freecrm, can you please give some details on how
    to lock the site using .htaccess ? Is that configuration
    file used by Apache ?

  8. #8
    freecrm's Avatar
    freecrm is offline x10 Elder freecrm is an unknown quantity at this point
    Join Date
    May 2008
    Location
    UK
    Posts
    629

    Re: How can I turn off my site temporarily ?

    Quote Originally Posted by cerbere View Post
    Yes freecrm, can you please give some details on how
    to lock the site using .htaccess ? Is that configuration
    file used by Apache ?
    I'll post a bit later and cover this - I'm just doing a bit of complex dev work that needs my attention....

  9. #9
    cerbere is offline x10Hosting Member cerbere is an unknown quantity at this point
    Join Date
    Nov 2007
    Posts
    51

    Re: How can I turn off my site temporarily ?

    After some research on Google with "Apache" and
    "htaccess" as keywords, I tried to use cPanel to enforce
    user/password access to my site. When I impose that
    on my public_html directory, here is what happens :

    - First access after firing up my browser : I get the
    user/password pop-up window; after entering the user
    and pass I specified to cPanel, I get an "Internal server
    error" page.

    - Subsequent accesses (i.e. hitting "refresh") : no more
    user/password dialog, only the "Internal server error"
    page.

    I FEEL I am close to doing what I want (see my opening
    message), but I am still doing something wrong... :>(

  10. #10
    xmakina's Avatar
    xmakina is offline x10 Lieutenant xmakina is an unknown quantity at this point
    Join Date
    May 2008
    Location
    England
    Posts
    265

    Re: How can I turn off my site temporarily ?

    It's more of a hack than a fix, but assuming you have an include(header.php) or similar throughout your site, you could add in a line to the header that reads an entry in the database (SELECT active FROM website) and
    Code:
    if(active == false) //show Site Closed
    It's just a thought until someone finds the proper fix.
    IF($this->$post.content() == "SEE SIG"){
    w3Schools and Google
    }

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. I can't use my site. Please
    By dinhvannam in forum Free Hosting
    Replies: 1
    Last Post: 10-04-2008, 10:07 PM
  2. Hi again "NEW SITE PPL" lol
    By thezone1 in forum Review My Site
    Replies: 13
    Last Post: 03-29-2008, 02:12 AM
  3. My site.. Need staff... maybe...
    By dsfreak in forum Scripts & 3rd Party Apps
    Replies: 6
    Last Post: 08-05-2005, 10:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers