Not sure if this is the right way to do things, but was wondering if anyone had some ideas or advice on how to achieve this.
I want to create a subdomain called demo.mysite.com
and i want this to load my codeigniter application which is in public_html, however if the sub domain is demo. then it loads another database instead of the main one
The following is from config/database.php
$db['default']['username'] = "main";
$db['default']['password'] = "password!";
$db['default']['database'] = "mainsite";
The reason I want to do this is i still make changes to my site and dont want to have to keep copying my entire site into a demo folder everytime i make a change.
Hope this makes sense