This condition seems very strange to change the base_url depending on a string check.