Welcome Guest, Not a member yet? Register   Sign In
Multiple applications - how?
#1

[eluser]koichirose[/eluser]
I'm trying to achieve what seems like an easy task: multiple applications with one CI installation, single host, for easier maintenance/upgrades.

now i have this directory structure:
root
--css
--scripts........(css and scripts will be shared between applications)
--system
----(all the system folders)
----application
------application1
--------config, controllers, views etc
------application2
--------config, controllers, views etc

Going to root/ points to application1, as stated in root/index.php:
$application_folder = "application/application1";

And this works, I can get to the main controller. The problem is: what to put in /application1/index.php and /application1/config/config.php ?

I need $application_folder in index.php
and $config['base_url'] and $config['index_page'] in config.php.

I tried some possible solutions but it doesn't work, all the links are broken since I don't know what the base_url is.

What I'd like to achieve is: www.mysite.com and www.mysite.com/application1 point to application1,
www.mysite.com/application2 points to application2 .

The documentation is not very clear on this matter.

Thank you for your help Smile
#2

[eluser]koichirose[/eluser]
Could someone help me? I think it's a very quick issue to be solved, but I don't seem to find the right answer...thanks
#3

[eluser]jedd[/eluser]
[quote author="koichirose" date="1255032908"]
I'm trying to achieve what seems like an easy task: multiple applications with one CI installation, single host, for easier maintenance/upgrades.
[/quote]

Yes - you'd imagine this kind of thing would pop up in the wiki, [url="http://codeigniter.com/wiki/Multiple_Applications_via_Symlinks/"]once[/url] or [url="http://codeigniter.com/wiki/Multiple_Sitessubdomains_for_Single_CI_system/"]twice[/url], wouldn't you?


Or in the forums every now and then, too:
[url="http://ellislab.com/forums/viewthread/131027/"]http://ellislab.com/forums/viewthread/131027/[/url]
[url="http://ellislab.com/forums/viewthread/126936/"]http://ellislab.com/forums/viewthread/126936/[/url]
[url="http://ellislab.com/forums/viewthread/126835/"]http://ellislab.com/forums/viewthread/126835/[/url]
[url="http://ellislab.com/forums/viewthread/125954/"]http://ellislab.com/forums/viewthread/125954/[/url]
[url="http://ellislab.com/forums/viewthread/101033/"]http://ellislab.com/forums/viewthread/101033/[/url]
[url="http://philsturgeon.co.uk/news/2009/06/How-to-Multi-site-CodeIgniter-Set-up"]http://philsturgeon.co.uk/news/2009/06/How-to-Multi-site-CodeIgniter-Set-up[/url]

Hint - search on titles only, for 'multiple sites'.



Quote:The documentation is not very clear on this matter.

Indeed.
#4

[eluser]koichirose[/eluser]
Actually none of these links helped me. I found another guide and managed to set up something like this:
root
--app1.php
--app2.php
--system
----application
------app1
------app2

I can access app1 by going to /app1.php and all subsequent links will have '.php' in it. Like /app1.php/register.
I'd like for it to become /app1/register

So now I guess it's an apache mod_rewrite problem, or can I set up something in CI to fix it?

Thanks again




Theme © iAndrew 2016 - Forum software by © MyBB