Reputation: 41
hopefully you can help me;
I'm setting up a new Drupal 7 environment and want to setup two subdomains which are independent from Drupal itself. One for the pre-launch and another for when Drupal goes into maintenance mode.
Is there a way to do this other than using a .htaccess file? i.e. a way of doing it using Drupal itself, so that when I want to put the file into maintenance mode, I can do it quickly without having to use a .htaccess file to do it.
So essentially, I want to enable the maintenance mode in Drupal 7 and then for everyone who should currently see the page in Drupal which says that the website is down for maintenance, is redirected to a sub-domain.
Is this possible, and if it is, what do I need to do to do it?
Upvotes: 1
Views: 1251
Reputation: 892
You can add a template file to you theme for the maintenance page - maintenance-page.tpl.php - and write into it something like:
<?php
drupal_goto('https://www.google.com', 307);
Just replace the google URL with your subdomain's URL.
Upvotes: 2