zenrider420 Posted February 24, 2009 Share Posted February 24, 2009 I did a search for this, and found a french post, but the Babelfish translation really did not make any sense...Does anyone know how to add multiple Maintenance IP addresses? Link to comment Share on other sites More sharing options...
zenrider420 Posted February 27, 2009 Author Share Posted February 27, 2009 Anyone?You should be able to specify as many as you want, like you do with email addresses, seperating them with a ; Link to comment Share on other sites More sharing options...
Travis Posted February 27, 2009 Share Posted February 27, 2009 would love to know this as well, ill be keeping a close eye on this thread. Link to comment Share on other sites More sharing options...
zenrider420 Posted March 4, 2009 Author Share Posted March 4, 2009 BumpI am building my site, and need to keep it closed, but really need to be able to allow multiple people to view it at the same time.... At this point for testing, this is REALLY important to me.I know this can be done somehow... Anyone have any ideas? Link to comment Share on other sites More sharing options...
daklock Posted April 19, 2009 Share Posted April 19, 2009 I would like to know this too. If anyone has found out how to do this please post it. Thank you! Link to comment Share on other sites More sharing options...
Trip Posted April 19, 2009 Share Posted April 19, 2009 Ok, I cant't give you a (tested) working code but after I looked in the sources I think you can try to modify the header.php in the root directory. /* Display a maintenance page if shop is closed */ if (isset($maintenance) AND (!isset($_SERVER['REMOTE_ADDR']) OR $_SERVER['REMOTE_ADDR'] != Configuration::get('PS_MAINTENANCE_IP'))) { header('HTTP/1.1 503 temporarily overloaded'); $smarty->display(_PS_THEME_DIR_.'maintenance.tpl'); exit; } $smarty->display(_PS_THEME_DIR_.'header.tpl'); Not tested but should be something like this: $ip1='102.134.234.123'; $ip2='123.123.123.123'; if (isset($maintenance) AND (!isset($_SERVER['REMOTE_ADDR']) OR $_SERVER['REMOTE_ADDR'] != $ip1 OR $_SERVER['REMOTE_ADDR'] != $ip2)) { ..... ..... } Greetz, trip Link to comment Share on other sites More sharing options...
daklock Posted April 19, 2009 Share Posted April 19, 2009 Thanks! I'll try this out tomorrow! Link to comment Share on other sites More sharing options...
neverblink Posted April 21, 2009 Share Posted April 21, 2009 I just tested it with my own IP (couldn't test the second IP as I only have on computer at hand a.t.m.) and this works:in header.php change line 26 to if (isset($maintenance) AND (!isset($_SERVER['REMOTE_ADDR']) OR !in_array($_SERVER['REMOTE_ADDR'], explode(" ", Configuration::get('PS_MAINTENANCE_IP'))))) Now you can set multiple IPs in the backend - SPACE SEPARATED!! Maintanance IP: 192.168.10.1 192.168.10.2 etc.if you want to use anything else instead of spaces to seperate the IPs, you need to change the line in header.phpexplode("anything you want", ... Link to comment Share on other sites More sharing options...
daklock Posted April 21, 2009 Share Posted April 21, 2009 Thanks! That works perfectly! Link to comment Share on other sites More sharing options...
babyewok Posted April 27, 2009 Share Posted April 27, 2009 Excellent, thanks for posting a solution - I will be trying this out shortly. It makes life so much easier in the develeopment stages as both me and my client can access the shop without having to change the IP every time! Link to comment Share on other sites More sharing options...
neverblink Posted April 28, 2009 Share Posted April 28, 2009 you're welcome.. let us know if it works for you Link to comment Share on other sites More sharing options...
babyewok Posted April 28, 2009 Share Posted April 28, 2009 Yes - it works like a charm, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts