A domain, a couple sub-domain, & multiplte instances |
[eluser]phusiondesign[/eluser]
So, here is my quandary. I have been using CI for awhile now and enjoy it very much. However, I now have a new goal and want to consolidate sites down under one domain. I have mydomain.com, two.com, and three.com. I want to redirect two.com to two.mydomain.com and three.com to three.mydomain.com. I can accomplish this fine within my registrar. Each of these sub-domains will have their own respective folder; two.mydomain.com will be located at mydomain.com/two and accordingly. My problem lies around how I configure CI to operate separate instances of CI on one domain. I would like to be able to drop a currently working directory tree into a sub-domain's folder and have it work, but it seems I am having issues... not sure what they are coming from either. It might be my .htaccess, I am currently using... Code: <IfModule mod_rewrite.c> I would appreciate any help to get this up and running. Thanks!
[eluser]thinkigniter[/eluser]
<?php In a single CI installation I would have multiple application folders e.g. system\application\one system\application\two system\application\three In your folders [ mydomain.com/one, mydomain.com/two ] I would have a Codeigniter index.php file that would have Code: $system_folder = "system"; And in the config.php for one/two/three applications I would have Code: $config['index_page'] = "/one/index.php"; I can NEVER remmeber. Well I'd give it a go anyway.
[eluser]phusiondesign[/eluser]
Ok, I think I am making progress... but need some further help. I am starting with a fresh server state and got CI up and running. I got www.mydomain.com working, and it works from system/application/one. Now I am trying to get one.mydomain.com to work from the same directory. I created a directory at mydomain.com/one and put a CI index.php file at that location but I am getting the below error. Any help? Code: Warning: require_once(/home/content/p/h/u/phusiondesign/html/domain/system/codeigniter/CodeIgniter.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/p/h/u/phusiondesign/html/domain/index.php on line 115
[eluser]Randy Casburn[/eluser]
I don't have a clue what you are 'trying' to do...but this is what I would try to do if 'I were you'... Code: [ root ] The ONE, TWO, and THREE each stand on their own but rely on a single CI core installed in the root of your web server. Each ONE, TWO, and THREE can have individually controlled .htaccess files. And each application has it's own set of configuration files that are separate. Does this help? Randy
[eluser]phusiondesign[/eluser]
Randy- I appreciate your help. I am trying to do pretty much exactly what you just described, and I will use your setup. I reconfigured it that way now, but am having the same issue with the application not in the root directory (two/application). The index.php file at domain.com/two/ gives me the same error I posted above. How do I reconfigure the index.php & config.php file to see the system folder?
[eluser]Randy Casburn[/eluser]
First, you'll want to get into [root][two]index.php and set $system_folder to $system_folder = "/system"; Note the leading slash. This will set the root/system folder as your CI base. --- Ok...so go into [root][two][application][config] and you'll want to change the settings there according the documentation. Do that for THREE too. And that should be it. Let me know. Randy
[eluser]phusiondesign[/eluser]
Ok, so I found this http://ellislab.com/codeigniter/user-gui..._apps.html, and am trying to follow it. It is very similar to what you suggested. Everything works except the sub-domain functionality, where I want two.domain.com to load /system/application/two I have set two/index.php Code: $system_folder = "/system"; I continue to get an error: Code: Warning: require_once(/home/content/p/h/u/phusiondesign/html/domain/system/codeigniter/CodeIgniter.php) If I put the two/index.php file at root, it works fine. I guess for some reason it does not like the base functionality. Any more thoughts?
[eluser]Randy Casburn[/eluser]
If you are following the file structure I suggested, then you should not have changed the application folder setting at all. That was not in my instructions to you. $application_folder should be: $appliction_folder = 'application'; === Try that and tell me what happens. === If you've changed the folder structure from what I told you above then this may or may not work. Randy
[eluser]phusiondesign[/eluser]
Randy - I followed your instructions again and adjusted the application call to $appliction_folder = ‘application’; I still get the same error... perhaps it does not like the leading slash on the system part. The error: Code: Warning: require_once(/home/content/p/h/u/phusiondesign/html/domain/system/codeigniter/CodeIgniter.php)
[eluser]Randy Casburn[/eluser]
/home/content/p/h/u/phusiondesign/html/domain/system/codeigniter/CodeIgniter.php You'll need to translate this path for me. Given the template that I provided above it appears that domain = [ root ] is this correct? Randy |
Welcome Guest, Not a member yet? Register Sign In |