Hey there guys. I had a quick scenario/question for you all.
Currently I'm using a shared host with multiple domains. My primary domain is just a few static pages without the need for a CMS. What I would like to do is install one instance of drupal for an add-on domain.
This add-on domain will sit inside a sub directory of the root of my primary domain. What I would like to do is install an instance of drupal inside this subdirectory which will host multiple sites. I've installed and ran multiple drupal sites within a single install by using drupals /sites folder functionality. My question is, how do I do this if drupal isn't installed at the root of my web server?
any help, ideas, etc. is greatly appreciated. Thanks!
Comments
Maybe no problems
It sounds to me like you don't have a problem. If your
subdomain.example.compoints to a subdirectory ofexample.com, there will be no problem usingsubdomain.example.com. Just don't try to useexample.com/subdomain.Likewise if it's not a subdomain. If it's
example2.comyou're pointing to the subdirectory, you'll only have problems if you try to useexample.com/example2.If that doesn't accurately describe your situation, however, you may have problems and should rephrase your situation or wait for someone who understands it better than I do. :)
not pointing to a sub domain
I'm not pointing to a subdomain. I am indeed pointing to separate domains.
Say my primary domain is example.com. At any given time I may want this to run from a Wordpress install, a static page or even a drupal install. For the time being it is just a static page, so i'm not really concerned.
For my "add-on" domain, www.example2.com, I want it to use drupal. For this I can easily install drupal into a subdirectory called "drupal". At this point I would simply point my add-on domain to this directory and www.example2.com would be my primary drupal site.
Now comes the tricky part...or so I think. If I wanted to run www.example3.com from the same drupal install, how would I go about this? Since the primary drupal site (example2.com), isn't my primary domain (example.com), I can't simply park this domain and have drupal "work it's magic", by picking it up from the "sites" folder.
Would I have to make www.example3.com an add-on domain and point it to the "drupal/sites/example3.com" folder? This is were I'm confused.
Figured it out
Nevermind, I figured it out. I didn't really have an issue at all. I simply installed drupal to a drupal subdirectory and point my domains to this directory. Drupal then takes over from there.
Thanks for the help though guys.
With my shared hostgator
With my shared hostgator account I could not point a domain to the drupal subfolder. Instead I had to add this to the .htaccess file in the public_html folder: (if your drupal root is public_html/drupal)
So when I add a parked domain, it will also go to the drupal folder.
Also modify the .htaccess file in the drupal folder:
http://reanimatepc.com
I have been able to simplify
I have been able to simplify the method I posted on the 19th of October 2008:
With my shared hostgator account I could not point a domain to the drupal subfolder. Instead I had to add this to the .htaccess file in the public_html folder: (if your drupal root is public_html/drupal)
So when I add a parked domain, it will also go to the drupal folder.
Also modify the .htaccess file in the drupal folder:
Now in the settings.php file of the website make sure this line is correct:
http://reanimatepc.com
Thank you!
Matti303 -
I racked my brain all morning before finding your post. Support at HostGator told me I was out of luck but your solution did the trick! Thanks.
Ted
Thanks
This is how you get it to work. Worked great for me, I'm using a addon domain at hostgator, and I just did exactly this and it works. Thanks Matti
Outstanding
Same issue w/ me and Hostgator, needing to redirect my primary domain to a subfolder.
Thanks for the great step-by-step.
keeping track of this
keeping track
As far as I understood your
As far as I understood your question it will work just fine - I jsut started working with Drupal myself and I put my sandbox to www.brielmusik.de/briel2-0/
"Give a man a place by the fire and he'll be warm for a day. But set him on fire and he'll be warm for the rest of his life!" - Lord Havellock Vetinari, Patrician of Ankh-Morpork
Visit my music webpage: www.brielmusik.de