Question

I want to make a website by CI that some people have a personal page like this

main-domain.com/index.php/sites/site_id/other-controller...

and I want to allocate a domain for everyone who has this site_id and visitors work by domains like this:

sub-site-domain.com/other-controller...

(just replace main-domain.com/index.php/sites/site_id/ to sub-site-domain.com/ ) and I want to add domains too server but every domains use the core files and database for loading data . but use their own domain for internal links . how can I do that? how can I add domains to server and whats the configuration? Can I user session of main-domain in sub-site-domains ? whats a best solution to have a website like this?

Was it helpful?

Solution

you can set dynamic base_url in config $config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'].'/'; or something like this

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top