Redirect all website pages to index.html

If you would like to put your website offline and redirect all the pages to index.html using Apache and .htaccess, here's the snippet:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/index.html$
RewriteRule .* /index.html [R=302,L]