Redirecting all requests to a single page
19/09/2005Useful when closing a site for maintenance:
RewriteEngine On RewriteCond %{REMOTE_ADDR} !^xxx.xxx.xxx.xxx$ RewriteRule !\.(gif|css)$ closed.php
(Where xxx.xxx.xxx.xxx is your local IP address.)
Allows requests from the specified IP, but everyone else gets the closed page. Allows requests for .gif and .css files so we can display the website logo on the closed page, and use the stylesheet.