I've asked this before at http://drupal.org/node/25011 but to no avail.
So I'll try to ask this in a different way.
If I want to do automatic multi-site feature without having to manually create folders in the "sites" directory and manually go into httpd.conf file and append it, how would I go about this?
Appending to httpd.conf is not something I can do because I dont have access to it. I've tried to add "Alias" to .htaccess file, but it gave me an error.
I've read on .htaccess file, and about what it can do. From what I understand, .htaccess can do anything httpd.conf can do. It basically just overrides settings. But for some reason, .htaccess will not accept the Alias statement.
Back to my question, how would I proceed? What technology do I need to look at to make this happen? If possible please post hints and code that will point me in the right direction. I've been trying to do this for the past week.
Comments
htaccess files are not equivalent to httpd.conf
this is from the following page which you should also read: http://apache-server.com/tutorials/ATusing-htaccess.html
It also tells you how to read the apache docs to see which level directives are supported at (hint: Context)
an example
http://httpd.apache.org/docs/mod/mod_alias.html#alias
===
Alias directive
Syntax: Alias URL-path file-path|directory-path
Context: server config, virtual host
Status: Base
Module: mod_alias
===
See the 'Context' line? '.htaccess' isn't listed, so you can't define aliases in per-dir htaccess files.
I realize this isn't giving you your answer but at least it should stop you from spending any more time fighting with the alias approach...
Difficult question...
If you don't have access to either the httpd or the vhosts file then you won't be able to make new domains like www.sub.domain.com, but you can easily make subdomains like this:
www.domain.com/user1
www.domain.com/user2
www.domain.com/dodgypornsite
www.domain.com/stuffedcatetc
It's dead easy, it only takes a very short script to:
Now I'm not a php programmer :) As you might be able to tell! But I'm not going to do all the hard work for you. It'll only take a little googling to come up with how that should be properly written but tbh, that's the 'general gist' of it!
The *best* thing about doing it like this is that you won't have to worry about adding any extra DNS settings as obviously www.domain.com will resolve to the right IP address regardless of what directory you put after it and that's the MOST important thing!!!
Pobster