+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / 404 Page not found working for ASPX Pages Only

404 Page not found working for ASPX Pages Only

1 posts, 0 answered
  1. Tom
    Tom avatar
    1 posts
    Registered:
    22 Dec 2015
    22 Dec 2015
    Link to this post

    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:

    http://10.4.201.31/404.aspx?aspxerrorpath=/5.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>

1 posts, 0 answered