Dynamically create <base> tag