Issue with 404 redirect

Vote:
 

I have the custom error redirect configuration as below in my web.config:

<customErrors mode="On" defaultRedirect="~/Error/UnderMaintenance.aspx">
   <error statusCode="404" redirect="~/Error/PageNotFound.aspx" />
   <error statusCode="500" redirect="~/Error/UnderMaintenance.aspx" />
</customErrors>

On the IIS made the following changes:

1.Right-click on the site/virtual directory, select properties
2.Goto the Home Directory/Virtual Directory tab, click Configuration (near the bottom)
3.Near the bottom again, click the insert button
4.Enter C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
5.Uncheck the "Verify that file exists" button, click Okay and close all the dialogues
6.Also on the "Custom Errors" tab, mapped the 404 error to "/Error/PageNotFound.aspx"

I have a valid page - "http://my-site/en/AboutUs/" published only in english language. On accessing the following urls:

1. http://my-site/en/AboutUs/, I get the published page as expected.
2. http://my-site/en/AboutUs1/, I get the "~/Error/PageNotFound.aspx" page as expected.

The issue is with the following scenario:

3. http://my-site/de/AboutUs/, I get the EPiServer error message - "Incorrect link - The link you gave does not work, either because the page it points to has been deleted or moved. If you clicked on a link, please inform the site’s webmaster that the link is faulty.", instead of redirecting to "~/Error/PageNotFound.aspx" page. Kindly let mw know why is it not redirecting to PageNotFound.aspx page on accessing the page in language(s) other than its actual publised language(s).

#64680
Jan 07, 2013 10:29
Vote:
 

This works in IIS7<

<system.web>
		<customErrors defaultRedirect="/Error.aspx" mode="On" redirectMode="ResponseRewrite">
			<error statusCode="404" redirect="/NotFound.aspx" />
			<error statusCode="500" redirect="/Error.aspx" />
		</customErrors>
</system.web>

...

<system.webServer>
	<httpErrors errorMode="Custom">
		<remove statusCode="404" />
		<error statusCode="404" path="/NotFound.aspx" responseMode="ExecuteURL" />
		<remove statusCode="500" />
		<error statusCode="500" path="/Error.aspx" responseMode="ExecuteURL" />
	</httpErrors>
<system.webServer>

And in EPiServer.config in the siteSettings node globalErrorHandling="Off"

  

#64702
Jan 07, 2013 14:41
Vote:
 

Hi Johan,

I work in IIS6 and the above configuration settings doesn't work. I still have the same issue.

#64721
Jan 08, 2013 10:26
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.