htaccess rewriting for an “under construction” page.
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !www\.example\.com$
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301]
You "Under construction" htaccess:
slightly different. it only canonicalizes the domain with the "www" missing, but does not canonicalize the subdomain. Beware - this should be supplemented by some HTTP authentication... it's not perfect for long-term use but it's a great quick hack
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301]
RewriteCond %{HTTP_HOST} www.example\.com$
RewriteCond %{REQUEST_URI} !/comingsoon\.html$
RewriteCond %{REQUEST_URI} !/.*\.png$
RewriteRule .* /comingsoon.html [R]
Filed under Uncategorized





