Welcome Guest, Not a member yet? Register   Sign In
Pointing mulitple domains to same CI installation

First of all I'd like to thank the CI community here for unwittingly helping this lurker countless times over the past few months. I've gone from not knowing any PHP (or programming for that matter) to building a pretty impressive little app (to me at least). I know this question has been asked in various forms, though I've not seen an answer that matches my specific query:

I'd like to be able to point multiple domains to their respective URL on a single CI installation.

// For example, newyork.com would point to:
//whilst london.com would point to

In the past this post from Phil seemed to be the de facto answer, but as far as I can see it pre-dates CodeIgniter 2.0 (and even then I don't need a separate database setup for each domain):

Currently I'm on shared hosting which I believe wouldn't let me change httpd.conf, though I'm happy to upgrade to VPS as necessary. I'm able to edit .htaccess, but is there a better method using CodeIgniter itself to handle the domains and redirect them to the correct place?

As a newcomer to programming from web design, the ins and outs of hosting, domain redirects & the trade-offs between Virtual Hosts vs. .htaccess are all a bit confusing.

Can anyone point me in the right direction or offer examples of how I might achieve this?


Theme © iAndrew 2016 - Forum software by © MyBB