Domains displaying wrong homepage
| Project: | Domain Access |
| Version: | 6.x-2.0 |
| Component: | - Domain Nav |
| Category: | support request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
I've started having an issue recently wherein trying to access a subdomain results in the primary domain's homepage being displayed instead. It's not a redirection issue, as the address bar shows the subdomain's URL, but for some reason is showing the primary domain...
It also seems to be an intermittent problem, as when it was happening before, I shift-clicked refresh and the subdomain loaded properly. However, it's started happening again and shift-clicking doesn't fix it. Even clearing my browser's cache doesn't work.
Any assistance in fixing this weird issue would be much appreciated!
UPDATE: Since typing this, it's started happening on my primary domain, showing the subdomain's homepage instead!

#1
Could be a server issue. There really isn't any information I can offer here. Check to be sure that Domain Conf is working correctly.
#2
The main way I'm changing between the domains is via the menu Domain Access creates. The link it has for my subdomain is: http://gr8flight.info/domain/gr8flight.info
Is it possible in trying to convert http://gr8flight.info/domain/gr8flight.info to http://gr8flight.info it's getting confused somewhere and displaying the wrong page?
Also, how do I check Domain Conf is working correctly?
#3
You mean the menu created by Domain Nav? I don't understand what links you are referring to. What is the domain value you entered?
If you have this: gr8flight.info/domain/gr8flight.info
it should simply be: gr8flight.info
Check Domain Conf by doing something simple, like changing the footer.
#4
Domain Nav, yes. It outputs a menu with links to each active domain (I currently only have two). The links it outputs are in the format: http://[current_domain]/domain/[domain_it's_linking_to]
So if I'm on http://gr8flight.info and I want to go to my primary domain, the link says: http://gr8flight.info/domain/brat.info
Similarly, if I'm on my primary domain and want to go to my secondary domain, the link says: http://brat.info/domain/gr8flight.info
I thought there might be an issue with this somewhere...
Yes, Domain Conf is working. I changed my secondary domain's footer and that appeared as expected (primary domain stayed as is).
#5
Did you edit those menu items in any way? These are hidden items in the {menu_router} table and should contain the proper callbacks.
You should never be seeing the text 'http://brat.info/domain/gr8flight.info' unless you activated these in the menu. Usually, people just use the provided block, which only shows the domain paths.
In the {menu_router} table, you should have a row that looks like this:
path: domain/gr8flight.infopage_callback: drupal_goto
page_arguments: a:1:{i:0;s:16:"http://gr8flight.info/";}
I tried your site. It looks like you are having internal DNS problems. Perhaps you have records in Domain Alias that are causing bad redirection?
#6
I think, from memory, the Domain Nav links are in the Navigation menu. I moved them to a different menu so I could display them as links in my nav bar using the Nice Menus module.
I looked in the {menu_router} table and found that row, but it's slightly different:
path: domain/gr8flight.infopage_callback: drupal_goto
page_arguments: a:1:{i:0;s:22:"http://gr8flight.info/";}
I'm not using the Domain Alias module, if that's what you're referring to...?
#7
That router entry is correct. I don't think you are having a problem there. I think you are having a DNS/HTTP_HOST resolution problem, or just configuration issues.
http://gr8flight.info/ is always returning brat.info for me, which suggests that the HTTP_HOST isn't being returned properly, or there is a misconfiguration in the settings folder.
#8
Not sure what you mean by DNS/HTTP_HOST issue or what I can do to fix it...
How can I test if HTTP_HOST is working, or if not, how can I fix it? What would have made this stop working in the first place?
My settings file is the same as the default one except that:
- The base URL is uncommented and set to:
$base_url = 'http://brat.info';- I've added the following to the bottom of the file:
/*** Add the domain module setup routine.
*/
include './sites/all/modules/domain/settings.inc';
#9
YOU CANNOT SET $base_url WHEN USING DOMAIN ACCESS.
This is documented. See 4.1 of INSTALL.txt.
#10
Ah. I knew that when I first installed Domain Access ages ago, but must have forgotten and enabled it recently...
From memory, I enabled it when I moved my site from the root directory on the server to /drupal. Can't remember why...
Will the site still work without base_url even though the installation is in a subfolder?
#11
It seems the site does still work, but there's a '/drupal' appended to my domain name in the URL. Will have to work out another way to get rid of that without breaking Domain Access... ;)
This issue has been fixed though, so thank you agentrickard!