Project:Subdomain
Version:6.x-1.4
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Thanks for putting together this great module. I was previously using some ugly custom code to get the same functionality and I like this approach much better. Unfortunately, I've encountered a problem.

My site is at example.com. It has a taxonomy vocabulary called section with the following terms: main, a, and b. I would like nodes in section a to map to a.example.com/node/xxxx and nodes in section b to map to b.example.com/node/xxxx. However, I would like nodes in section main to map to example.com/node/xxxx, not to main.example.com/node/xxxx.

This is how I configured subdomain:

Create subdomains for: Taxonomy vocabulary and associated content
With the selected vocabulary's terms: Section
Using: the name of the taxonomy term
disallow the following subdomains: main

In my pathauto configuration, I set the Node path settings to [subdomain]/node/[nid].

Everything is working great, but when I create a node in section main, the alias points to
main.example.com/node/xxxx instead of example.com/node/xxxx. Is this incorrect behavior? What should I expect to happen if pathauto tries to create an alias to a disallowed subdomain?

Comments

#1

Do you have a workaround for this behavior?

I'm facing the same 'ignore' with the www. It seems that I can't use: www.mydomain.com it points to mydomain.com/~www

TIA,
Fossie

#2

Here's the change that gets the behavior I want, but I'm not sure if it's the behavior that the module's creators had in mind.

189c189
<               if ($term_name) {
---
>               if ($term_name && !subdomain_reserved($term_name)) {

#3

Status:active» needs review

Super G. Thanks for the patch! I haven't had a chance to test it yet, but it looks right. If anyone else can test and confirm it works, post a reply... otherwise i should have a chance to take a look at it in a couple of weeks.

#4

Status:needs review» fixed

Committed.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here