--- umc/js/setup.js (Revision 37887) +++ umc/js/setup.js (Arbeitskopie) @@ -493,11 +493,16 @@ ++nchanges; // check whether a redirect to a new IP address is necessary - if ( umc_url === null ) { - if ( ikey == 'interfaces/eth0/address' && newVal ) { - umc_url = 'https://' + newVal + '/umc/'; - } else if ( ikey == 'interfaces/eth0/ipv6/default/address' && newVal ) { - umc_url = 'https://[' + newVal + ']/umc/'; + if ( umc_url === null && orgVal === window.location.host && newVal ) { + var interfacesRegexp = /interfaces\/eth[^\/]+(\/ipv6)?.*\/address/; + var match = interfacesRegexp.exec(ikey); + if (match) { + var ipv4 = !match[1]; + if ( ipv4 ) { + umc_url = 'https://' + newVal + '/umc/'; + } else { + umc_url = 'https://[' + newVal + ']/umc/'; + } } } }