• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
multi domain in codeigniter

Hi all
I write application in codeigniter and i need to run that application in multi domain.

Cane i do that and if i can how ?


Thanks for your help.

[eluser]Phil Sturgeon[/eluser]
If you are hosting multiple domains on the same server and you have root access to the file system (or simply write permissions to those directories) then you can put codeigniter anywhere you like.

On as *nix based machine, i'd reccomend renaming systems folder to codeigniter and putting it as below:

Quote:/usr/local/codeigniter (this is the system folder)

/usr/<path to your account)/public_html (this is your application folder)

/usr/<path to your account)/public_html/index.php
/usr/<path to your account)/public_html/config
/usr/<path to your account)/public_html/controllers
/usr/<path to your account)/public_html/models
... etc.

Then just put those paths into your index.php file. 1 index file, one controllers folder, one config fodler, etc for each domain.

thank you for your reply but i need the same application (1-all controller 2-all models 3-all views 4-one config 5- same DB) run for all domain as one.



[eluser]Phil Sturgeon[/eluser]
In that case its even easier.

$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/';

Then just park your other domains on a main one using cPanel or whichever server management tool you use.

just don't forget to modify cookie domain as well

it's work
thank you for replay

[eluser]RaZoR LeGaCy[/eluser]
If you use APC on the server, does it still opcode?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.