Deactivate an entire website with .htaccess file.

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Deactivate an entire website with .htaccess file.

Post by JellyFish »

How can I deactivate an entire website with an .htaccess file? Can I do anything like this with an .htaccess file? I just would like to be able to disable a site with something in an .htaccess file so that no one can visit any of the pages. This way when I want to enable the site again I just remove some kind of directive from the .htaccess file.

Is there any .htaccess directive that will restrict all users or IPs?

Thanks for reading, all help is appreciated.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Deactivate an entire website with .htaccess file.

Post by alex.barylski »

Use Debian and it'sa a2ensite or a2dissite utilities...
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Deactivate an entire website with .htaccess file.

Post by Eran »

Code: Select all

deny from all
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Deactivate an entire website with .htaccess file.

Post by JAB Creations »

JellyFish wrote:How can I deactivate an entire website with an .htaccess file?
Copy and paste this in to the file...
wrgwrv35890gjm35234T@YG%^#&Y@#%Y@#%IGYJ@#%GH()K#%Y#%)
:twisted:
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Re: Deactivate an entire website with .htaccess file.

Post by JellyFish »

Hey thanks pytrin, that's exactly what I was looking for.
JAB Creations wrote: Copy and paste this in to the file...
wrgwrv35890gjm35234T@YG%^#&Y@#%Y@#%IGYJ@#%GH()K#%Y#%)
That's a bit scary... Looking. 8O
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Deactivate an entire website with .htaccess file.

Post by JAB Creations »

It was a joke. :lol: It's so easy to break an entire website with .htaccess and I still haven't grasped whatever the Apache language is unfortunately. But if you're looking to keep people out with .htaccess then it's really not all that hard! :twisted:
Post Reply