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 am localizing my web site in three languages.I have managed host names for it. For handling Errors, I have added error page, I want to display that error page according to selected culture
<system.web> <customErrors mode="On" defaultRedirect="~/Error.aspx"> <error statusCode="404" redirect="~/Error404.aspx" /> </customErrors>...............<system.web>
I have added that in we.config
Using umbraco version 6.0
Handling 404's in Umbraco is done with NotFoundHandlers.
Some more information can be found here :http://our.umbraco.org/wiki/install-and-setup/configuring-404-pages
For multi site environments you can use http://ucomponents.codeplex.com/wikipage?title=MultiSitePageNotFoundHandler
I think you should take a look in the file called umbracoSettings.config. The file is located in the folder called config.
When you have found this one search in the file for <errors> then you should find this section in the file
<errors> <!-- the id of the page that should be shown if the page is not found --> <!--<error404> <errorPage culture="default">1</errorPage> <errorPage culture="en-US">200</errorPage> </error404>--> <error404>1</error404> </errors>
I have taking the code from a clean installation of Umbraco 6.0.3, som my error page id is set to 1, but you have to switch the id of 1 out with the id of your error page and in your case you also should use the culture="".
I hope the example above can help you further.
You also need to set this in your web.config
<httpErrors existingResponse="PassThrough" />
Hi Dennis and Dave,
Thanks for reply. Code is working and links are useful.
but i would like to do little bit modification in code
<!-- the id of the page that should be shown if the page is not found -->
Hi Dennis and Dave,,
By using above code I am able to display localized 404ErrorPage as per selected language but I cant localized ErroPage
Eg : If u have any login functionality just try to enter Username as </html> Its giving error , I have handled that error page. I have login field and localization option on single page only. After choosing English language it is displaying error message in danish lang only.(Default language is danish language.)
How to do that?
Are you got any solution for this problem?
I've written a blog post that explains (with code examples) how to create a custom IContentFinder to do this automatically:
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted