404 Page not found working for ASPX Pages Only

Posted by Community Admin on 03-Aug-2018 13:52

404 Page not found working for ASPX Pages Only

All Replies

Posted by Community Admin on 22-Dec-2015 00:00

Support,  I have both html and aspx pages in my site but only ASPX pages are getting redirected to the 404.aspx page. Is there any way I can have it for all the pages?

Thanks for the help

Tom

Example:

10.4.201.31/404.aspx

http://10.4.201.31/5.html  IIS 404

http://10.4.201.31/5  IIS 404

 

Code:

<httpErrors errorMode="Custom">
<clear />
  <remove statusCode="403" subStatusCode="-1" />
  <remove statusCode="404" subStatusCode="-1" />
  <remove statusCode="500" subStatusCode="-1" />
  <error statusCode="403" path="404.aspx" responseMode="Redirect" />
  <error statusCode="404" path="404.aspx" responseMode="Redirect" />
  <error statusCode="500" path="404.aspx" responseMode="Redirect" />
</httpErrors>

 

<customErrors mode="RemoteOnly" defaultRedirect="404.aspx">
<error statusCode="403" redirect="404.aspx" />
<error statusCode="404" redirect="404.aspx" />
<error statusCode="500" redirect="404.aspx" />
</customErrors>

This thread is closed