I’m in the process of splitting resources across domains. I’ve read a few different ways on how to handle this. From what I’ve read the correct way to handle is to use absolute paths versus relative. If this is true, how would I handle this as I push my local development live? The domains won’t match from local to live.
The base_url allows for a single domain only as far as I’ve read. Should I create an asset path helper and autoload that? Or, is there something I’m missing here?
http://www.example.com would operate normally.
http://images.example.com/assets would point to my asset folder that exists in the root.
After further research this is the way I solved my problem. Thanks to the Codeigniter forum for helping me get to this solution. Create a switch that checks which stage of development the site is in and set the base_url and asset_url config accordingly.
Then just extend the url_helper and create a function to get the asset_url