[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Suspending a website
- Subject: Re: [cobalt-users] Suspending a website
- From: "Steven Werby" <steven-lists@xxxxxxxxxxxx>
- Date: Sat Apr 8 17:22:35 2000
Dan <dan@xxxxxxxxxxxxx> wrote:
> The point was, what about other pages on the site?
That's right, Dan. I have a client who is severely delinquent on payment so I
want redirect all web requests for his website to a single webpage stating
"domain.tld has been closed due to non-payment." And I want to block FTP and
email access. I spent some time searching the Cobalt archives and reading
Apache directive docs, but I didn't find a solution that was satisfactory.
Changing DocumentRoot in httpd.conf and putting a Redirect directive in
.htaccess prevented access to the site, but resulted in 404 errors for documents
other than the main index file.
I've tested the solutions everyone came up with and here is what worked best for
my situation.
Dan's solution:
1. change DocumentRoot in httpd.conf
2. in .htaccess of new DocumentRoot directory put "ErrorDocument 404
http://host.badsite.tld"
3. create single webpage with custom message named index.html
Paul's solution:
1. don't change DocumentRoot
2. in .htaccess put "RedirectMatch .*
http://maindomain.tld/badaccounts/badsite.tld/"
3. create single webpage with custom message named index.html
I had to change Paul's "RedirectMatch *" to "RedirectMatch .*" b/c web requests
seemed to go into an endless loop. I'm not an expert on regular expressions,
but my change seems to work. Both solutions work well. I'd say Dan's probably
is the way to go if you are going to delete, move or archive the bad website and
Paul's is the way to go if you plan on re-establishing the account soon. I also
added a character to the encrypted passwords in /etc/shadow to block FTP and
email access.
Steven Werby {steven-lists@xxxxxxxxxxxx}