Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have this setup for culture and hostnames:
"https://www.bmsilo.com/fr/" should be removed, but for now its needed since when I go to www.bmsilo.fr it renders English variant of content. Or as another example; when I go to https://www.bmsilo.fr/produits/silos I get 404 error (again; it tries to resolve to Enlgish content, and that is on url https://www.bmsilo.com/products/silos), but for https://www.bmsilo.com/fr/produits/silos I correctly get French content.
Why is that?
In my Program.cs I have this setup that might be relevant:
if (app.Environment.IsProduction()) { app.Use(async (context, next) => { var request = context.Request; var host = request.Host.Value.ToLower(); var path = request.Path.Value ?? string.Empty; var scheme = request.Scheme; // Ensure SSL if (scheme == "http" && !context.Request.Headers["X-Forwarded-Proto"].ToString().Equals("https", StringComparison.OrdinalIgnoreCase)) { var newUrl = $"https://{host}{path}{request.QueryString}"; context.Response.Redirect(newUrl, permanent: true); return; } // Ensure www if (!host.StartsWith("www.")) { var newUrl = $"{scheme}://www.{host}{path}{request.QueryString}"; context.Response.Redirect(newUrl, permanent: true); return; } await next(); }); }
...
removing the "/" one would fix that wouldnt it?
Yes, that fixed it :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
bmsilo.fr does not hit correct culture, but bmsilo.com/fr does
I have this setup for culture and hostnames:
"https://www.bmsilo.com/fr/" should be removed, but for now its needed since when I go to www.bmsilo.fr it renders English variant of content. Or as another example; when I go to https://www.bmsilo.fr/produits/silos I get 404 error (again; it tries to resolve to Enlgish content, and that is on url https://www.bmsilo.com/products/silos), but for https://www.bmsilo.com/fr/produits/silos I correctly get French content.
Why is that?
In my Program.cs I have this setup that might be relevant:
...
removing the "/" one would fix that wouldnt it?
Yes, that fixed it :)
is working on a reply...