If I have WWW prefix handling enabled, direct navigation to a node (or any path) with a www. prefix drops the whole path and goes to the front page.
Live examples:
http://supportunitedway.org/youth/msti - works
http://www.supportunitedway.org/youth/msti - pops back to the homepage
On another server:
http://apexic.net/node/10 - works
http://www.apexic.net/node/10 - pops back to the homepage
In both cases, if I turn WWW prefix handling off, the second address works. I don't have any weird mod rewrites. I've got a wildcarded virtual server working. I will keep checking my server settings, but I wanted to see if anyone else had experienced this. That it is happening on two different servers makes me think it's a module thing. It's very odd to me since the only place I can see this gets applied is a simple bit of code in domain_init():
if (variable_get('domain_www', 0)) {
$_subdomain = str_replace('www.', '', $_subdomain);
}
Comments
Comment #1
agentrickardConfirmed bug. But this was sort of by design. The intent was to bounce users from www.example.com to example.com when they mistype a URL. But this does not account for links written by others -- or legacy links in search engines.
If you edit line 63 of domain.module, it should work as expected.
Old code:
New code:
Comment #2
agentrickardComment #3
gcassie commentedThat seems to do it. Thanks very much for your help, yet again.
Comment #4
agentrickardComment #5
agentrickardCommitted to HEAD and 5-dev.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.