Redirect ALL requests under a domain to static page [closed] Redirect ALL requests under a domain to static page [closed] apache apache

Redirect ALL requests under a domain to static page [closed]


I actually ended up finding the answer on ServerFault:

https://serverfault.com/questions/32513/url-redirect-to-another-page-on-the-same-site

"This example will 302 redirect all URLs to "/underconstruction.html":

RewriteEngine OnRewriteCond %{REQUEST_URI} !=/underconstruction.htmlRewriteRule ^ /underconstruction.html [R=302]

(which translates as "If URI is not /underconstruction.html, redirect to /underconstruction.html")" - Tommeh