Link to home
Start Free TrialLog in
Avatar of russelldav
russelldav

asked on

.htaccess to 'CLOSE' my website

here is an extract of my .htaccess file which I use to close my website down.

This is controlled througha  PHP script which re-writes the file at the click of a link e.g. on the admin page I can click 'Close' to shut teh website down for maintenence/update etc.

=====
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !down\.php [NC]
RewriteRule ^(.+) http://something.com/error/down.php [R]
=====

However, this obviously redirects access to any page to the error document.

What I would like to do, is exclude the 'admin directory' from this redirect so that i can still login to admin to 'OPEN' the website again.

If i've been unclear just ask.

Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of dorward
dorward

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial