A website I am currently working on is currently responding to requests on http://www.mysite.com/dv with 301, where I would have expected a 404.
My site has no content item named DV, there is nothing in the site that corresponds to "DV", and I can't understand why on earth I am seeing this. I originally found these /DV/ URLs while looking at Google Webmaster Tools.
Then I used Fiddler to analyse the request and found
Response sent 26 bytes of Cookie data:
Set-Cookie: wwwwebsite#lang=DV; path=/
This appears to correspond to the Maldivian language. I did not enable this language, and it does not appear under /system/Languages.
I then noticed I can also navigate to http://www.mysite.com/de-CH which is not an enabled language on my site either, leading me to believe I will get results like this for every non-enabled language.
Is there a way to return 404 for unsupported languages in Sitecore?
The issue you are having sounds similar to http://sdn.sitecore.net/Forum/ShowPost.aspx?postid=51681 but I an't find
DV
inLanguageDefinitions.config
. I am also able to replicate your error so I don't think it is environment specific to your implementation. Would suggest you contact Sitecore Support.Try seeing what your "languageEmbedding" value in the web.config is set to.
It can be set to the following: asNeeded | always | never
I would normally set it to "never" unless you have a site, which is set in multiplate languages, then set it to "always". The default is "asNeeded" which I frankly find kinda silly :)
I don't believe this is actually related to languages at all. If you were to add any random characters in place of the DV, you'd still get a 302 redirect to a 404. Perhaps without the language cookie though.
You should follow the directions here to turn on server side error page redirects.
http://herskind.co.uk/blog/2012/03/sitecore-404-without-302