Magento Forum

how to close a store? 
 
Petroski
Jr. Member
 
Total Posts:  17
Joined:  2008-03-31
 

Hi everybody

i want to close my magento store while is not finish

allowed ips from configuration menu seems dont work to me
I put another another ip and the home page loads.

any idea?

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

You could just upload an index.html file on the frontend, it wouldn’t stop anyone who finds a direct link, but it would stop direct traffic.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gabriiiel
Guru
 
Avatar
Total Posts:  563
Joined:  2008-04-29
France - Paris
 

Create a page called index.html with the message “Coming soon” for example.

Then in index.php, before

if (version_compare(phpversion(), ‘5.2.0’, ‘<’)===true) {
echo ‘<div style="font:12px/1.35em arial, helvetica, sans-serif;"><div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;"><h3 style="margin:0; font-size:1.7em; font-weight:normal; text-transform:none; text-align:left; color:#2f2f2f;">Whoops, it looks like you have an invalid PHP version.</h3></div><p>Magento supports PHP 5.2.0 or newer. <a href="http://www.magentocommerce.com/install" target="">Find out</a> how to install</a> Magento using PHP-CGI as a work-around.</p></div>’;
exit;
}

write

if ($_SERVER[’REMOTE_ADDR’] != ‘XX.XX.XX.XX’)
{
require ‘index.htm’;
die();
}

where XX.XX.XX.XX is your IP adress.

If u want to add the IP of your home for example and the IP of your office just write

if (($_SERVER[’REMOTE_ADDR’] != ‘XX.XX.XX.XX’) AND ($_SERVER[’REMOTE_ADDR’] != ‘XX2.XX2.XX2.XX2’))
{
require ‘index.htm’;
die();
}

Save & ftp-upload to your server

Hope it helps

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top