I want to temporarily redirect all visitors to a new site to a under_construction.php page while I finish the site, but allowing me to see the real site. I've come up with the following:
Rewrite to www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com[nc]
RewriteRule ^(.*)$ http://www.example.com/$1 [r=301,nc]
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$
RewriteCond %{REQUEST_URI} !/under_construction\.php$
RewriteRule .* http://www.example.com/under_construction.php [R=302,L]
//Prevent viewing of .htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>
Address 127.0.0.1 will be actually my visible IP address.
My problem is that under_construction.php fetches images from the /img/ folder which of course are not properly displayed. How can I include that folder in the rewrite rule?
Thanks in advance!