6

.htaccess redirect to maintenance page

view full story
linux-howto

http://serverfault.com – I want to upgrade my site online, I want to show visitors maintenance page till I finish upgrade. I tried this code Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_URI} !/maintenance.html$ RewriteCond %{REMOTE_HOST} !^888\.888\.888\.888 RewriteRule $ /maintenance.html [R=302,L] But this code is redirecting all page to maintenance.html, for example www.domain.com going to maintenance.html www.domain.com/sub/ going to maintenance.html I want only root directory redirection not sub directories, like www.domain.com to maintenance.html www.domain.com/sub to www.domain.com/ (HowTos)