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.
Deactivate an entire website with .htaccess file.
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Deactivate an entire website with .htaccess file.
Use Debian and it'sa a2ensite or a2dissite utilities...
Re: Deactivate an entire website with .htaccess file.
Code: Select all
deny from all- 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.
Copy and paste this in to the file...JellyFish wrote:How can I deactivate an entire website with an .htaccess file?
wrgwrv35890gjm35234T@YG%^#&Y@#%Y@#%IGYJ@#%GH()K#%Y#%)
Re: Deactivate an entire website with .htaccess file.
Hey thanks pytrin, that's exactly what I was looking for.

That's a bit scary... Looking.JAB Creations wrote: Copy and paste this in to the file...
wrgwrv35890gjm35234T@YG%^#&Y@#%Y@#%IGYJ@#%GH()K#%Y#%)
- 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.
It was a joke.
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! 