Closing a website (mod_redirect)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

>From time to time, I will need to update my website. During this time, I
would like to forward all traffic to a ‘closed for site maintenance’ page.
This page will have an image. I’ve had a go using mod_redirect:

RewriteEngine on
RewriteRule ^.*/splash.png$ http://localhost/kayaknames/closed/closed.png
[R]
RewriteCond %{REQUESTURI} !^.*/closed/closed.png.*$
RewriteRule ^.*$ http://localhost/kayaknames/closed/closed.htm [R,L]

Closed.htm:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html style="">
 <head>
  <title>Kayak Names</title>
 </head>
 <body style="text-align: center; vertical-align: middle;">
  <div style="margin: auto; height: 500px; width: 900px;">
   <img src="splash.png" alt="Kayak Names" />
  </div>
 </body>
</html>

It works, but the image is not shown as it redirects to closed.png
(correctly), but then redirects again to closed.htm - hence no image.

Wondering if anybody had any ideas where I am going wrong??

Thanks,

Alex


No virus found in this outgoing message. Scanned by AVG Free 8.0
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.6.9/1635 - Release Date: 26/08/2008
07:29


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux