I have a domain set up: http://www.domain.com, that runs a codeigniter website.
I want a subdomain with the exact same website (except a different view for the footer) running at a subdomain http://www.sub.domain.com.
I currently have the exact same files under the sub domain folder, which works fine, but I do not want to update a whole bunch of folders for each subdomain.
Make sure that http://www.domain.com and http://www.sub.domain.com are pointing to the same location on your server (this will be an apache configuration). You can then verify the $_SERVER[‘SERVER_NAME’] variable to know if the user came through http://www.domain.com or http://www.sub.domain.com – then display to footer accordingly.