Umbraco - two websites on single Umbraco instance - 2nd site gives 404
I've set up two Umbraco websites on a single instance of Umbraco (v 4.7.1.1). If I visit the 1st website (which is listed first under the 'content' node):
www.mysite.com
... I get the correct homepage (the homepage is nested at content > www.mysite.com > Global > homepage)
However when I go to the 2nd website (listed directly under the 'content' node, below the 1st website):
m.mysite.com
... I get a 404. The homepage for the site is nested the same way (content > m.mysite.com > Global > homepage), and I can get to the homepage by using the address m.mysite.com/global/homepage. I've checked/tried the following:
The 'Manage hostnames' configuration for both sites in Umbraco is correct
I have useDomainPrefixes set to true in my umbracoSettings.config
There are no redirects in my IIS 7.5 that are redirecting the 2nd domain name
My bindings are correctly set up in IIS
the default document in my IIS 7.5 for my Umbraco instance is set to default.aspx. I've moved it to the top of the list
The hosts file on the web server is pointing m.mysite.com to the correct IP
the homepage for my 2nd site is using a template
Tried adding a property to the doctype that's used by the root node for the 2nd 'website', with alias 'umbracoRedirect' and type 'content picker', and pointing the node to my homepage (apparently this method can have problems anyway, even if it works)
I've tried adding a property to the doctype that's used by the 'Global' node, with alias 'umbracoInternalRedirectId' and type 'content picker', and pointing the node to my homepage
Tried adding a property to the doctype that's used by the 'Global' node, with alias 'umbracoRedirect' and type 'content picker', and pointing the node to my homepage (apparently this method can have problems anyway, even if it works)
Tried putting a homepage for my 2nd site directly below the root node of the 2nd site (although the 'Link to document' for this page comes up as m.mysite.dev/test/)
Tried adding an umbracoInternalRedirectId to the website node itself, to point to the new homepage directly below the root website node
Tried an iisreset and then flushing my DNS resolver cache, the site still gives a 404
Tried fully republishing both websites
Separately re-published all nodes in the 2nd website, and separately published the new homepage I created immediately below the site root node
OK so I've discovered that in the physical folder structure for the Umbraco installation there's a file config\UrlRewriting that contains the following:
So if I change things so that the page I want to be my homepage for the mobile site is the page 'en' in the following structure:
Site 2
- global
- en
It works, since its Umbraco URL is now http://m.mysite.com/global/en. The question I still have though is that for Site 1, the Umbraco URL isn't http://www.mysite.com/global/en, it's a totally different URL, however the homepage displays correctly for the domain. Can anyone explain this?
Umbraco - two websites on single Umbraco instance - 2nd site gives 404
I've set up two Umbraco websites on a single instance of Umbraco (v 4.7.1.1). If I visit the 1st website (which is listed first under the 'content' node):
www.mysite.com
... I get the correct homepage (the homepage is nested at content > www.mysite.com > Global > homepage)
However when I go to the 2nd website (listed directly under the 'content' node, below the 1st website):
m.mysite.com
... I get a 404. The homepage for the site is nested the same way (content > m.mysite.com > Global > homepage), and I can get to the homepage by using the address m.mysite.com/global/homepage. I've checked/tried the following:
Hi Chris and welcome to our :)
I'm not sure how your site is structured, so before going into detail I just want to know if I got it right.
Is the setup done like this
Site 1
- Global
- Homepage
Site 2
- Global
- Homepage
?
/Jan
Hi Jan thanks for getting back to me and for the welcome!
Yes, you're right, the site's structured like you say, except I also tried:
Site 2
- homepage
To see if if that'd work
OK so I've discovered that in the physical folder structure for the Umbraco installation there's a file config\UrlRewriting that contains the following:
destinationUrl="~/global/en"
rewriteUrlParameter="ExcludeFromClientQueryString"
ignoreCase="true"/>
So if I change things so that the page I want to be my homepage for the mobile site is the page 'en' in the following structure:
Site 2
- global
- en
It works, since its Umbraco URL is now http://m.mysite.com/global/en. The question I still have though is that for Site 1, the Umbraco URL isn't http://www.mysite.com/global/en, it's a totally different URL, however the homepage displays correctly for the domain. Can anyone explain this?
is working on a reply...