Link to home
Start Free TrialLog in
Avatar of UnexplainedWays
UnexplainedWays

asked on

404 not working for a non .aspx extention

I've added whats required in the web.config file

    <customErrors mode="RemoteOnly" defaultRedirect=/DefaultError.aspx">
      <error statusCode="404" redirect="FileNotFound.aspx" />

This works fine for whenever i try to type in a webpage with a .aspx extention that doesn't exist.  However, if i just try to type in "mysite.com/stuff" then it doesn't seem to trigger the 404.  Does anyone have an idea why?  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of DavidBook
DavidBook

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of UnexplainedWays
UnexplainedWays

ASKER

ok, thanks.
Your welcome.
David.
I went exploring around my hosting control pannel and they had a custom error page setting.  It does a different job to when there is a missing aspx file.  The local host seems to be catching all the errors with just the web.config, however my problem was on the server.

I didn't realise that a URL required an extention.