Hi, I'm totally new to Drupal but experienced in SEO and PHP. I've always rolled my own crappy CMS because of custom needs. I'm REALLY hoping Drupal will help me to stop this wasteful methodology.

The main thing I need to figure out is how to take full control of Drupal URLs. My future sites need simple URLs in the style of about.com wherein each subject or content type is assigned a unique subdomain (one site, many dynamic subdomains like http://dogs.about.com, http://cats.about.com).

All incoming subdomain links are directed to the base folder where an HTACCESS file does an internal URL re-write (no redirects) for Drupal. This part is easy for me so this is NOT a question about DNS or HTACCESS.

What I need to know is how to get Drupal/Path-auto etc. to generate (alias?) links using my pattern? Here's the URL pattern (with no subdomain for the default type "pages"):

  http://[content-type].domain.com/[pathauto-node-title].html

it would look something like this:

  pages:        http://domain.com/[node-title].html
  forums:       http://forum.domain.com/[node-title].html
  blogs:        http://blog.domain.com/[node-title].html
  articles      http://article.domain.com/[node-title].html
  news items:   http://news.domain.com/[node-title]-[date].html
  newsletters:  http://newsletter.domain.com/[node-title]-[date].html
  secure:       https://secure.domain.com/[node-title].html 

I'm looking in Pathauto but it doesn't seem to allow defining the entire URL. I hope I'm just missing something obvious. Does the "alias" hold an entire URL or just the path part?

I've searched around in the forums and the other subdomain questions seem to deal with DNS, HTACCESS, redirecting etc. and not how to get Drupal to create links using the pattern. Perhaps this part is already too obvious?

Thanks,
Chad

Comments

pancho’s picture

You may also want to post your question to or join the Drupal-Paths-Group at http://groups.drupal.org/paths. For now I unfortunately can't help you, but I hope help is not too far away! would be interested in how this can be solved...

chadj’s picture

Thanks for the tip, I'll try that.

- Chad

** edit: doesn't look like there's much activity over there. Are there other sites that have incorporated drupal with subdomains? Drupal.org doesn't seem to have done this. (They do not share database between drupal.org and groups.drupal.org).

maartenvg’s picture

I'm also looking for such behavior, the mod_rewriting part is easy, but Drupal (ofcourse) won't generate correct URLs. I agree that pathauto or path would be a logical module to handle such requests, but to do so, it requires some rewriting.
I'll look into rewriting pathauto (and creating a separate module) to rewrite URLs al together, not only the paths.
If it succeeds, I'll keep you posted.

Cheers,
Maarten

[edit] Nevermind, I just saw your post on groups.drupal.org, and it seems that http://drupal.org/project/multidomain does the trick :)