What is the best way to temporarily disable my website?

 January 29, 2011     0 Comments

If you need to make changes and need to take your sites offline for a little while, but don't want to just completely erase it, you can use the .htaccess file that catches all requests and directs them to one page, like so:

RewriteEngine on
Rewriterule ^(.*)$ http://example.com/construction.html [r=301,nc]

It will redirect all visitors to http://example.com/construction.html, obviously you'd fill in your own address instead of example.com.

How helpful was this article to you?

Powered by

FraudLabs Pro Secured Seal