How to put up temporary front page in Drupal site?

What's the best practice approach and / easiest to put up a temporary page at announcing the site will be offline?

I certainly don't want people to access any of the pages directly (bookmarks for example).
Who is Participating?
junipllcConnect With a Mentor Commented:
Ah, gotcha. Untested, but here goes...something like this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]

Open in new window

I hope I have that right.


The best way to do this is probably to put the site into maintenance mode. You can then theme maintenance-page.tpl.php to your liking, and it will be displayed instead of the default.

In order to work on the site in the meantime, you'll need to log in at:

But during this time no other pages will be available to view if one is not logged in.


sandshakimiAuthor Commented:
I'm thinking more of a redirct approach. Perhaps add a line to the .htaccess file?

I want all pages in  to go to (where I've got a temp. content to display)
The first solution is the right one!!
Putting the site on maintenance mode (admin/config/development/maintenance), means exactly that: the site is offline, and no page is available via bookmarks, links etc.
You could go to the configuration page and set a different page to be the home page there.
Configuration -> Site Information ->choose the page you want to go in: Default front page.
And then the other pages can be un published.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.