Hi,

I am using drupal for a small sports organization(OTG).It has a home site say http://otg.com,When some organizations registered with otg,then the organization home site will be http://org.otg.com with the user name/password captured at the time of registration.Also note that each organization has their own themes,modules etc.

I have tried with $db_prefix,But let me know how can i automate the multi-user registration with diffrerent themes,contents etc?.I have created a new folder in /sites directory at each time of organization registration.eg if the organization name is "abc" then a new folder will be created in /sites directory as /abc.otg.com with a settings.php file.What i want to do is the settings.php file should have its own $db_prefix(usually the organization name - eg $db_prefix = 'abc_').How can i do this dynamically?

Could anyone pls explain how can i achieve sub-domain in Drupal?I have two scenarios in my project

Main site :
1) http://otg.com

sub domains home page :
1) http://org1.otg.com
2) http://org2.otg.com

Teams Home page
1) http://org1.otg.com/teams
2) http://org2.otg.com/teams

So every organization should have diffrenet theme,content as the same applied to themes also.In my local machine i have created a folder called themes under web_root and installed drupal again.I know this is wrong ,but how can i achieve the sub-directory in drupal.When i say http://org.com/teams it should not open the team home page.Team page should be opened only if i type http://org1.otg.com/teams.But this is not happened in my scenario.In the hosts (C:/windows...) file i have added

127.0.0.1 otg.com
127.0.0.1 org1.otg.com
127.0.0.1 org2.otg.com

Is it right?How can i proceed further?

Regards,

Nagarajan.L

Comments

rivena’s picture

You'll need to write some kind of script, though I am not sure what. Your script will need to be able to take a user registeration, create a sub domain based on the name on the organization, install and automatically configure Drupal, and insert that user as the user in your new site.

I have heard of people who have made such scripts, but I haven't seen any posted. Maybe if you search a little more, you will find someone who mentions it, and can ask them for that script.

Anisa.

-----------------------------------------------------------
Kindness builds stronger bonds than necessity.

www.animecards.org - 18,000 card scans and counting!
-----------------------------------------------------------

grcm’s picture

You could use Apache's mod_rewrite to map the subdomains onto the main Drupal installation.

ie the accounts dept could be otg.com/accounts , but accounts.otg.com would redirect to that page. This wouldn't be identical to a real subdomains, but each department could happily use their own subdomain.

Basically, you have a procedural idea causing a technical problem. If you can point out that using strict subdomains for this costs money and is unnecessary, you've solved the problem.

-- Version Control your Drupal web site with The File High Club's Free Trial!