Hello again:

This is a rejigged post from an earlier one, because I think the last post was too confusing for folks.

Here is what my developers have requested I pass onto the forum to HELP! find a solution:

We have made a Drupal instance with 6,000 pages (nodes), we also have 6,000 domains...one for each node. These nodes are nothing more than one-page landing websites for the 6,000 domains that define and "point" to them.

Now I want to assign each domain to its separate, associated, node.

This means that if I have a node called "node/example1" then I want to access it via http://www.example1.com ... "node/example2" accessed via http://www.example2.com ..."node/example6000" accessed via http://www.example6000.com

This means that when a user types http://www.example1.com in their browser then the page http://mysite/node/example1 is served to the browser, but in the address bar it is still http://www.example1.com

As well, for indexing by search engines and in SERPS, it would be great if http://www.example1.com is also shown.

We are already using the "path" module to get a more user friendly URL, but we can't get the URLs to be independent domains using this. We have also tried .htaccess, but without success.

Other info that might be helpful: Dedicated server - Apache - cPanel/WHM.

BTW: We can not use any redirect function. We are using robots meta "index, no follow". This is not an SEO issue.

Can anyone help?

All the best,

Steve

Comments

yelvington’s picture

In settings.php, you can define values for certain system settings that override database values. You may be able to write a few lines of code that uses the domain name to redefine the value of the homepage setting, thus delivering the appropriate page for each site.

RealyCoolSteve’s picture

Thanks for your suggestion yelvington, and thank you too teLA, but you'll have to forgive my lameness.

Could you elaborate?

I'm sure my devs will know what you're talking about, but I am a neophyte when it comes to this sort of thing.

Uh, like, where might I find the settings.php?

In Drupal or Apache?

Could it also be possible to set something in cPanel, which is where the domains themselves will be managed? Or would this be construed as a "redirect" which can not be an option.

I'm trying my best to come back to my devs on Monday with a solution, or at least a real solid path to a solution.

Surely I am not the first person with this particular circumstance? Anyone out there with experience in how to configure multisite scenarios?

Thanks again to all,

Steve

yelvington’s picture

The settings.php file is created when you install Drupal, and it contains key configuration data including your database settings. There's a section where you can override system variables. You could try adding PHP code that computes the correct path for the homepage, based on the requested domain, and sets the site_frontpage variable in the array that you can see in the example:

http://api.drupal.org/api/drupal/sites--default--default.settings.php/6/...

Your developers should be able to figure this out in about five minutes, assuming that your rules for paths are regular.

RealyCoolSteve’s picture

You'll have to forgive my simplistic, childlike, innocence on this, but I've been looking through the backend ADMIN for my project and I've come across Administer > Structure > URL Aliases

As you are all no doubt aware, there is "Existing System Path": http://mysite.com/.../[node/1234] where [node/1234] is the field that can be edited.

Then there is: "Path Alias": http://mysite.com/.../[example1] where [example1] is the field that can be edited. And it says right below this "Specify an alternative path by which this data can be accessed."

I can see that for both entries, one can't change the first part of the URL string, e.g., "http://mysite.com/.../"

But, hypothetically, leaving "Existing System Path" untouched: Cool, I do want to "Specify an alternative path by which this data can be accessed." So, let me specify it, for goodness' sake! To wit:

What if one could modify the "Path Alias" to be 100% editable (excluding "http://"), e.g., http://[example1.com]

And following on this hypothesis:

Do it in bulk?

Am I just being incredibly naïve? (I tend to be a linear thinker) Am I really asking that a new module, for an actual multi-site application of Drupal, be written?

Best,

Steve

yelvington’s picture

http://drupal.org/project/pathalias automatically creates word-based aliases for node URLs.

RealyCoolSteve’s picture

Well, that's a bummer. There's no such page.

What I did find, however is: http://drupal.org/project/path_alias_xt which looks promising.

Meanwhile, I have taken note of your other suggestion for settings.php as this also looks very promising.

atb,

Steve

rdeboer’s picture

Hi Steve,
What you're after is not what path_alias_xt (Extended Path Aliases) is intended for and is out of the scope of the module.
Extended Path Aliases only extends aliases like "myprefix/myalias" for, say, "node/123" to include all subpaths, eg "myprefix/myalias/edit" for "node/123/edit". It then also allows you to use these aliases and their wildcard-variations when specifying block-visibility, e.g "myprefix/myalias/*".
What you're after is replacing the domain name part of the URL....

prasoon gupta’s picture

Domain Access module allows you to point your DOmain to a drupal NODE...

its easy and simple but I am unaware if it will support 6000+ nodes/domains

After installing Domain Access module on Drupal7
Add your domains in Structure > Domains
Along side create a node for that domain ex, domain ex5.com your node is node/5
now set this 'node/5' as Site frontpage

Best of Luck!

Prasoon Gupta
-ComputerPlanetIndia.com : infinite Innovations! -