Add proper URL parsing