CodeIgniter Forums
A domain, a couple sub-domain, & multiplte instances - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: A domain, a couple sub-domain, & multiplte instances (/thread-10210.html)

Pages: 1 2 3


A domain, a couple sub-domain, & multiplte instances - El Forum - 07-24-2008

[eluser]phusiondesign[/eluser]
That is correct domain = [root]. In my effort to trouble shoot I have determined the error revolves around the leading slash. I copied the root][two]index.php to [root] and it did not work either... I removed the slash, and it worked fine. Do I need to rewrite something else in that file which will call the system folder correctly?


A domain, a couple sub-domain, & multiplte instances - El Forum - 07-24-2008

[eluser]Randy Casburn[/eluser]
It worked fine. "It" has now become confused. You've over written the root index.php file and changed it to the configuration into exactly what was working for the original working version that was already in that directory.

Let me say this differently...

Before the previous post:

You had index.php in the [ root ] directory. That index.php file had:
Code:
$system_folder = "system";
$application_folder = "application";

In the [ root ][ two ] directory you had an index.php file that had:

Code:
$system_folder = "/system";
$application_folder = "application";

===========

Then, you moved the index.php file from [ root ][ two ] to [ root ], and changed it from this:

Code:
$system_folder = "/system";
$application_folder = "application";

to this:

Code:
$system_folder = "system";
$application_folder = "application";

==========

If I have this correct, do you realize what you did, and why it worked? You said the site in the [ root ], what you called site ONE has worked all along. So of-course this should work.

What have I mis understood?

I'm thinking your web server just does not like relative paths, or has some odd issue that is working against you here. Either that or some thing is just not the same as what we've been describing to each other.

Randy


A domain, a couple sub-domain, & multiplte instances - El Forum - 07-24-2008

[eluser]Randy Casburn[/eluser]
Ok...so try this then...

Put you index.php file back into [ root ][ two ] and put these lines into it...

Code:
$system_folder = "../system";
$application_folder = "application";

Notice the ../ this time in front of "system".

Let me know what happens.

Randy


A domain, a couple sub-domain, & multiplte instances - El Forum - 07-24-2008

[eluser]phusiondesign[/eluser]
It works! That seemed to be the problem. Here is my setup now.

Code:
[ root ]
--- [ system ]
   --- index.php // this is your ONE index.php file //
          ($system_folder = "system"; $application_folder = "application";)
   --- .htaccess // this is your ONE .htaccess file //
   --- license.txt
   --- [ application ] // this is your ONE appliction //
   --- [ All the system folders go here... ]

--- [ two ]
   --- index.php// this is your TWO index.php file //
          ($system_folder = "../system"; $application_folder = "application";)
   --- .htaccess // this is your TWO .htaccess file //
   --- [ application ] // this is you TWO application //

--- [ three ]
   --- index.php // this is your THREE index.php file //
          ($system_folder = "../system"; $application_folder = "application";)
   --- .htaccess // this is your THREE .htaccess file //
   --- [ application ] // this is you THREE application //

Now, I just need to get the .htaccess files working correctly. Also, I am going to try a similar structure and will post that setup. Thanks!


A domain, a couple sub-domain, & multiplte instances - El Forum - 07-24-2008

[eluser]phusiondesign[/eluser]
Ok, so I also just tried this format and it works.

Code:
[ root ]
--- index.php // this is your ONE index.php file //
       ($system_folder = "system"; $application_folder = "application/one";)
--- [ system ]
   --- license.txt
   --- [ application ]
      --- [ one ]
      --- [ two ]
      --- [ three ]
   --- [ All the system folders go here... ]

--- [ two ]
   --- index.php// this is your TWO index.php file //
          ($system_folder = "../system"; $application_folder = "../system/application/two";)

--- [ three ]
   --- index.php // this is your THREE index.php file //
          ($system_folder = "../system"; $application_folder = "../system/application/three";)

Now I need to configure the .htaccess files... any suggestions?


A domain, a couple sub-domain, & multiplte instances - El Forum - 07-24-2008

[eluser]Randy Casburn[/eluser]
You can make your life a lot easier by moving the application folders but that's up to you. What you have done is counterintuitive.


A domain, a couple sub-domain, & multiplte instances - El Forum - 07-25-2008

[eluser]phusiondesign[/eluser]
Randy - Can you elaborate on why you think what I have done is counter intuitive? Also, I have not been able to get two.domain.com/index.php/welcome to work, but two.domain.com works... with either directory setup.


A domain, a couple sub-domain, & multiplte instances - El Forum - 07-25-2008

[eluser]Randy Casburn[/eluser]
[quote author="phusiondesign" date="1217023467"]Randy - Can you elaborate on why you think what I have done is counter intuitive? [/quote]

Because you have a directory that holds an index file for an entire application...and you store that entire application (and this is the counterintuitive part) - in a subdirectory of another (different) application - that is not associated with it.

That is just weird. Why not just put the application directory for the [ two ] application under the [ two ] directory...


ah...on to the follow-up point then...

[quote author="phusiondesign" date="1217023467"] Also, I have not been able to get two.domain.com/index.php/welcome to work, but two.domain.com works... with either directory setup.[/quote]

Right...[edit] yes...this could be a whole bunch of things related to CI. I edited this because my original post was wrong based upon a reread of your post above.

There is a lot more we need to talk about, but lets settle on the directory structure first.

Hope this is helpful.

Randy


A domain, a couple sub-domain, & multiplte instances - El Forum - 07-28-2008

[eluser]phusiondesign[/eluser]
Ok, I changed the directory structure back so that it matches the setup in post #13. Although I don't have any .htaccess files yet.

So I suppose this puts us at the second half of your post where we need to address the issues related to CI and being able to access additional controllers for each sub-domain.

Status:
www.domain.com --- works
one.domain.com --- works
two.domain.com --- works

www.domain.com/index.php --- works
one.domain.com/index.php --- works
two.domain.com/index.php --- works

www.domain.com/index.php/welcome --- doesn't work
one.domain.com/index.php/welcome --- doesn't work
two.domain.com/index.php/welcome --- doesn't work

(I know this won't work yet, no .htaccess)
www.domain.com/welcome --- doesn't work
one.domain.com/welcome --- doesn't work
two.domain.com/welcome --- doesn't work


A domain, a couple sub-domain, & multiplte instances - El Forum - 07-30-2008

[eluser]Randy Casburn[/eluser]
Please re-post you .htaccess contents, these settings from your config.php file:

$config['base_url'] = "http://127.0.0.1/dead_ci/";
$config['index_page'] = "";
$config['uri_protocol'] = "AUTO";

Next, you'll need to validate the at mod_rewrite is running on your apache server.

Also will need you to search through your apache http.conf file for every occurrence of ALLOW OVERRIDE that apply to your specific directories involved with your installation and make sure this value is set to ALL in EACH location that may have an effect on these directories.

If you do all that, let me take a look, we'll get this figured out.

Randy