-
-
Notifications
You must be signed in to change notification settings - Fork 562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Routing with Two Different Sites #437
Comments
Hi there! You can't have more than one site on the same hostname. If the pipeline can't find any site that specifically specifies the requested hostname then the default site is used (this is the standard case). You can use sites for several purposes, for example subdomains:
Or folder/suffix mapping for language sites, for example
|
Thank you for the quick reply! I tried both, however, no success yet. I set the hostnames / sites as following (specific dev example):
When I reload the page at The ultimate goal is actually subsites for languages and my thinking was to catch the user culture / language and route to the matching subsite. |
Let me try to do a setup of your case! This will be good input to the documentation as well |
Great @tidyui - Thank you very much for you efforts! I played a little with the settings and it seems that I cannot leave a hostname empty when another site has a specific hostname (with suffix) assigned. |
Hej Community!
I got somewhat lost and can't wrap my head around the following:
I have a simple scenario with 2 Sites, the
DefaultSite
and a customMaintenanceSite
. Each has a single page with a couple of Fields, such as,StringField
etc. Her comes the problem: I cannot access the page of the Site that is not set as default. If I call the slug of the non-default page / site directly the respective Action is called, however, anid
of00000000-0000-0000-0000-000000000000
is passed to the action.The pages are both available in the database with the expected slug.
In
CmsController.cs
I have the following Actions to get the requestThe version of Piranha is the latest, namely
5.2.1
.Am I misunderstanding anything?! I checked the routing documentation and as I far as I understood, the slug should be found and the route generated accordingly.
Any help appreciated :)
The text was updated successfully, but these errors were encountered: