Proper handling of base url