Welcome Guest, Not a member yet? Register   Sign In
Multiple sites - subdomain / htaccess issue
#1

[eluser]Unknown[/eluser]
Hi folks,

Maybe some of you have encountered this challenge before.
I have 2 sites that will run off the same database. For political reasons, one part of the site has to be deployed on another subdomain, while the rest is standard.

So basically, I'll have:
SITE 1 : www.site.som/folder
SITE 2 : subdomain.site.com

The whole Codeigniter installation, Application folder, database, and other assets will stay the same for both sites.

What I've done is created a "SITE" global variable, which successfully changes what site is being displayed.

But, I can't get the subdomain thing to work.. Note that I suck at .htaccess and couldn't find anything to seamlessly redirect all requests to the subdomain to the main site.

Some have suggested using CName but my SITE1 is in a subfolder so CName doesn't work, and this will be on a shared host with no access to Apache configs. Htaccess is the only possibility, and I suck at htaccess.

Basically, I need to make all requests sent to http://subdomain.site.com/* end up at www.site.som/folder/* without the URL actually changing.

Is that possible?
Thanks a lot!




Theme © iAndrew 2016 - Forum software by © MyBB