function urlRewrite(){
	//console.log('urlRewrite()');
	var currenturl = location.href;
	var currenthost = "http://"+location.host;
	var currenthostendslash = "http://"+location.host+"/";
	var path = location.pathname;
	
	if(currenturl.indexOf('/xtr/') < 0) {
		
		if(currenturl.indexOf('#') < 0) {
			//Injects # in the url.
			//Check if path is larger then 1
			if(1 < path.length){
				// check for the language
				var locationParts = path.substr(1, location.pathname.length).split('/');
				var language = locationParts.splice(0, 1);

				if (locationParts.length > 0)
				{
					location.href = currenthost + '/' + language + "#"+ '/' + locationParts.join('/');
				}
			}
			
		}
		
	}
}
