-
Notifications
You must be signed in to change notification settings - Fork 13
403 error when turning AddCultureAsRoutePrefix from false to true #27
Comments
From #18:
|
I misread your post, this should work. I will investigate that. |
I added the configuration of #18 but it does not work. I think this would be a nice feature because it allows to set the routes of a web site to:
And later add translation as: pt/contacto without breaking the original routes. |
Can you show me which routes where created? I used your setup for the test project and it worked. You should have "/en" and "/en/test" registered. |
It was added: en/ (en) Maybe the problem is with home route having en/ ? |
And you cannot access en/ or en/test? |
Yes, I can access both ... I am not sure if this is not the problem I had before where I need to add the usual route rule after attribute routing ... But a route with only Route should be considered the homepage. |
So you expect to access "/"? |
You could use neutral routes or use
Atm AddCultureAsRoutePrefix is added to every route, even to empty ones - it could be discussed if this shouldn't be. |
I supose that sometimes having the culture prefix on all pages might not be te best option. For example having it in homepage or some not translated pages ... But maybe others could opinate on this since i am not sure about all scenarios. |
Hello,
I have the following actions on an MVC 5.2 web site with Route Localization:
On this website I do not want to translate any routes. I want only to add the current culture as prefix.
In the future I will add translations so I want to have everything set up. So I have:
This works fine but I do not get the culture prefix on my routes.
So I turned Add Culture Prefix to true:
And know I get an
What am I missing?
Thank You,
Miguel
The text was updated successfully, but these errors were encountered: