Instead of using typical hard coded base_url in CI if dynamically generated base_url is always good , as it reduces
time as well lots of extra efforts. Dynamic base_url can be generated using following code: