I want to create a landing page which is to give some information to the customers saying this website is in working progress please visit our sister company websites, so the customer can only visit our sister companies. Thanks
2 Answers
This can easily be done
- Create a file name maintenance.flag in your magento root directory. Contents under this file doesn’t matter, you can keep it empty.
- Change the maintenance file (located in magento root -> errors -> default directory) to show proper message when user visits your website.
If you with your ip still want to access the page then do this
Step 1: In order to have access, we need to modify index.php file in Magento root folder and specify list of IPs that will allowed to access your site. Download and open original index.php file. On line 47 put the following code:
$ip = $_SERVER['REMOTE_ADDR'];
$allowed = array('69.65.23.100','2.2.2.2');
In the $allowed = array(’69.65.23.100′,’2.2.2.2′); you should specify list of IPs that will have access to your site.
Step 2: Search for the following code:
if (file_exists($maintenanceFile)) {
Replace it with
if (file_exists($maintenanceFile) && !in_array($ip, $allowed)) {
In order to edit content showing on maintenance page, open errors/default/503.phtml file, find the maintenance message and edit as you wish.
Source: Here
Simply put maintenance.flag
in root folder and edit the content to show your child sites. Simple as it is.