Url Alias not working for domain paths

1.2k views Asked by At

I'm using domain access module in my website and have multiple domains in my website. For example I have the domains

  1. test.example.com (primary domain)
  2. test1.example.com

When I create a sample content "Contact" and provide it with the URL alias as 'contact' (assume node id as 143), Under domain access options I select "send to all affiliates". When I try to access the below url

test.example.com/contact (its working fine)
test1.example.com/contact (page not found)

But both of these below are working

test.example.com/node/143  
test1.example.com/node/143  

Is it possible to have the same URL alias for all the domains. I used domain path module and its not working as needed.

Thanks.

1

There are 1 answers

0
Tardi McGrardi On

In Drupal 7, what happened to me was, each domain had its own language. I'd turned off multi-lingual support on the content types thinking, "if I select the domain I want the content to appear on, it will default to the domain's language". Wrong!

I found that each node was picking up the default language from /admin/config/regional/language . In this case English. The node's language wasn't displayed anywhere, so I missed it. When I tried to view a page assigned to a French URL, clean URLs just won't work. I could access via the /node/nnn, but not the clean URL.

You need to :

  • edit the content type
  • in 'Publishing options', 'Multilingual support' set that to enabled.
  • save
  • edit the content type again
  • go to "Manage Display"
  • 'Language' field, set the 'Format' for that to 'Hidden'
  • save
  • each each node and either set the language to the domains default OR set to 'Language neutral'

Then sit back and watch those URLs work :-)