I'm seeing a localization error when testing microsite functionality in Web 8.5 and DXA 2.0 (.NET), ie servername:port/abc. I see there are two ways to do this, using either the server-relative URLs or context-relative URLs. Either looks like it should work, although using a context appears to be slightly more elegant. However on my test server for both scenarios, I am seeing same debug error "Request URL 'http://servername:8888/CO/' maps to Localization [5 ('English')]", any pointers for where the misconfig is would be welcome. Localized language/culture is not a requirement, but I've followed that convention to help troubleshoot.
I have three test websites/publications (edited to respond to Rick's answer):
Publications
- 400 Example Site (tcm:0-5-1)
- 400 Example ES (tcm:0-3719-1)
- 400 Example NL (tcm:0-3720-1)
Websites
- http://servername:8888/es/ --> 403 error, Access to servername was denied
- http://servername:8888/nl/ --> DXA 404 error
Topology config
get-ttmwebsite
BaseUrls : {http://<servername>:8888}
CdEnvironmentId : CdEnvironmentStagingId
EnvironmentPurpose : Staging
Id : Website1
get-ttmwebapplication
ContextUrl : /
WebsiteId : Website1
EnvironmentPurpose : Staging
Id : Website1_RootWebApp
ContextUrl : /nl
WebsiteId : Website1
EnvironmentPurpose : Staging
Id : WebApplication2
get-ttmmapping
CmEnvironmentId : TridionCM_localhost
PublicationId : tcm:0-5-1
EnvironmentPurpose : Staging
WebApplicationId : Website1_RootWebApp
RelativeUrl : /
PrimaryMappedUrl : http://<servername>:8888/
IsOffline : False
Id : Mapping1
CmEnvironmentId : TridionCM_localhost
PublicationId : tcm:0-3719-1
EnvironmentPurpose : Staging
WebApplicationId : Website1_RootWebApp
RelativeUrl : /es
PrimaryMappedUrl : http://servername:8888/es
IsOffline : False
Id : Mapping3
CmEnvironmentId : TridionCM_localhost
PublicationId : tcm:0-3720-1
EnvironmentPurpose : Staging
WebApplicationId : WebApplication2
RelativeUrl : /
PrimaryMappedUrl : http://servername:8888/nl/
IsOffline : False
Id : Mapping4
Preceding configuration are as noted from forum posts are:
Multilanguage with DXA 2.0 SDL Web 8.5
All binary images stopped working when created Ttm Mapping with default value for Relative Url
Configuration
- Have published the ES and NL publications, and verified they are in broker DB via discovery endpoint http:///PublicationMappings(TCMID)
- Master publication (400 Example Site) config
- Child NL (400 Example NL) config, localized Localization configuration
- Child ES (400 Example ES) config, localized Localization configuration
- Have published all three publications, and published again Publish Settings after making any config changes
Force synced TTM
sync-ttmcdenvironment -Id CdEnvironmentStagingId Synchronizing CdEnvironment 'CdEnvironmentStagingId' Are you sure you want to perform this action? Y
- Have restarted IIS, done /admin/refresh on front-end
- _all.json file from master publication
_all.json file from child publication ES
No ES or NL website in IIS
Copy of staging webapp under master webapp with foldername es.
Edit to reflect updated ttmmapping
After updating the NL microsite mapping to have a RelativeUrl of "/nl", output is below, which has an extraneous /nl appended to the PrimaryMappedUrl param.
CmEnvironmentId : TridionCM_localhost
PublicationId : tcm:0-3720-1
EnvironmentPurpose : Staging
WebApplicationId : WebApplication2
RelativeUrl : /nl
PrimaryMappedUrl : http://servername:8888/nl/nl
IsOffline : False
Id : Mapping4