WebsiteBaker 2.13.9 R22 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
// Comment line below// define('WB_URL', "http://localhost:4001"); // no trailing slash or backslash!!function getLocalIP(){ exec("ipconfig /all", $output); foreach($output as $line){ if (preg_match("/(.*)IPv4 Address(.*)/", $line)){ $ip = $line; $ip = str_replace("IPv4 Address. . . . . . . . . . . :","",$ip); $ip = str_replace("(Preferred)","",$ip); } } return $ip;} define('WB_URL', 'http://'.str_replace(' ', '', getLocalIP()).':'.$_SERVER['SERVER_PORT']); // no trailing slash or backslash!!
print_r(getLocalIP());
<VirtualHost 192.168.2.149:80> DocumentRoot "F:/cms/wb_test_1611" ServerName wb1611 ServerAlias wb1611 ErrorLog "F:/cms/wb_test_1611/local_error.log" <Directory "F:/cms/wb_test_1611"> Options -Indexes +FollowSymLinks Options +SymLinksIfOwnerMatch AllowOverride All Require all granted DirectoryIndex index.php index.shtml index.html index.htm Require ip 192.168.2 Require valid-user </Directory> </VirtualHost>