Welcome Guest, Not a member yet? Register   Sign In
Domain redirection for several applications
#1

[eluser]Byrro[/eluser]
Hello,

I started developing with CodeIgniter recently and I´m loving it! I´d like to use several applications inside the same framework. In the main directory of codeigniter I´ll have, of course, many 'index' files for each application. For example:

Application 1: Foo
Will have: application directory 'foo' inside 'system/application/'
Index file: foo.php
Inside foo.php: $application_folder = "application/foo"

Application 2: Bar
Will have: application directory 'bar' inside 'system/application/'
Index file: bar.php
Inside bar.php: $application_folder = "application/bar"

So the user accessing the Foo website has to be pointed to foo.php and the same with Bar. My problem is they are different websites, each one with a different domain. So, www.foo.com needs foo.php as index page and www.bar.com needs bar.php, but they are in the same directory. How can I do this? I´ve been trying with .htaccess, but didn´t find a way... Do you have any tips?

Thank you very much!




Theme © iAndrew 2016 - Forum software by © MyBB