0

I have the following in mind and I'm not sure how to realize it nicely.

  1. Drupal 7 serves many nodes from several different taxonomies
  2. If I visit a taxonomy page e.g. example.com/category-one/taxonomy-term-one I get a list of all the corresponding nodes
  3. If I click on one of the list nodes, I get to the page example.com/content-type/node-name
  4. There are some special nodes in this list, when I click on them, I get to the following special page node-name.example.com. This page is exactly the content like example.com/content-type/node-name but in this case, only the subdomain URL is accessible and example.com/content-type/node-name doesn't exist to avoid content duplication.

The first 3 items are easy standard tasks: The Pathauto module handles all the taxonomy url alias tasks etc.

The 4th item is my problem. My idea so far: The subdomain node-name.example.com just references a special folder under the drupal root, which contains some logic to determine the name of the node according to the subdomain. With the given subdomain I get the node id and just load all the stuff from drupals db with a service implemented for this usecase.

Questions:

  1. Ist it possible to give a drupal node an absolute url alias like node-name.example.com just like node-category/node-name?
  2. Are there any problems going to be concerning drupals $baseurl/site configuration?
  3. As I'm editing everything just over the example.com/node/node-id/edit there should be no problems with the editing functionality, no?
  4. What remains to be done?

Did anybody had to fulfill a similar apporach and could share some thoughts regarding my approach?

0

Have you looked at the Domain Access module?

The Domain Access project is a suite of modules that provide tools for running a group of affiliated sites from one Drupal installation and a single shared database. The module allows you to share users, content, and configurations across a group of sites such as:

  • example.com
  • one.example.com
  • two.example.com
  • my.example.com
  • thisexample.com <-- can use any domain string
  • example.com:3000 <-- treats non-standard ports as unique

By default, these sites share all tables in your Drupal installation. The Domain Prefix module (for Drupal 6) allows for selective, dynamic table prefixing for advanced users.

Basically you can assign a Node across any number of configured subdomains you've made drupal aware of.

  • Thank you for the suggestion! I'm not sure if I should use this module. I don't want to share nodes across multiple subdomains, I want to replace the nodes url with the one special subdomain covering this node. So I want it to get listed under node-name.example.com and to be listed with this link under its category f.e. example.com/category-one/taxonomy-term-one. I don't want my whole drupal site to be available under node-name.example.com, I just want the one exact node page to be available there. If I take domain access, I get the whole stuff 'copied' and shared... Perhaps Global Redirect? – user3657114 Jun 10 '14 at 13:09
  • you can "share" the node(s) into any subdomain. You can share only 1 node, or any number of nodes to a domain. You may want to install it in a test setup locally and try it out for yourself for an hour or two. I believe Domain will also create the list of subdomain(s) the node is used in as well from the source domain. – tenken Jun 10 '14 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.