var language = "en"; if( location.href.match(/net-kitchen.jp\/?$/) != null ) { location.replace("/"+"en"+"/"); }