one codeigniter controller named site needs to handle multiple domains

Posted by Mauricio Webtailor on Stack Overflow See other posts from Stack Overflow or by Mauricio Webtailor
Published on 2012-06-21T21:04:40Z Indexed on 2012/06/21 21:16 UTC
Read the original article Hit count: 205

Got a controller in codeigniter who handles different sub sites.

site/index/1 fetches content for subsite a

site/index/2 fetches content for subsite b

Now we decided to register domain names for these sub sites.

so what we need: http://www.subsite1.com -> default controller should be site/index/1 without the site/index/1 in the uri

http://www.subsite2.com -> default controller should be site/index/2 without the site/index/2 in the uri

I fiddled and tried to play with routes.php but getting nowhere.. Can somebody point me in the right direction?

© Stack Overflow or respective owner

Related posts about codeigniter

Related posts about routes