My main Drupal installation is in a folder under main directory(public_html/drupalsite).
- I created a subdomain via Cpanel. Set Document Root as public_html/drupalsite.
- I created a DB for subdomain..
- Then created a directory for my subdomain under my main Drupal installation:
- Copied settings.php from drupalsite to drupalsite/sites/subdomain.drupalsite.com and changed DB settings to make it match its DB.
- Created a symlink.php with this code(and run it by visiting via browser):
<?php symlink('/home/myhostaccount/public_html/drupalsite', 'subdomain.drupalsite.com'); ?>
- I visited subdomain.drupalsite.com, it gave error then i visited subdomain.drupalsite.com/install.php and made installation without error.
Everything was normal till this step. Then i wanted to enable Clean URLs for subdomain and tried a lot of variation on .htaccess(I read tens of page about this, saw lots of different examples, tried most of them).
Then I deleted directory that Cpanel created for subdomain when i noticed there was a complete Drupal installation in it. And i managed to lost my main site. Because all files under main site was deleted(except directories). It seems symlink settings was wrong. :(
It took more than 2 hours to reinstall(i deleted everthing except sites folder, uploaded drupal 7.12 files again and updated) and fix it. (It seems OK now but i am still suspicious about it might create problems in future because of this mistake.)
My question is:
How to set Clean URLs for a multi site subdomain which base Drupal installation is in a folder, not in main directory(eg. instead of public_html, it is installed to public_html/drupalsite)?
I have read tons of documents, tried a lot but could not manage. I need a tested, working solution. And i don't want to take the risk of losing my main installation.
Thanks in advance.