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=/DefaultEr ror.aspx">
<error statusCode="404" redirect="FileNotFound.asp x" />
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.
<customErrors mode="RemoteOnly" defaultRedirect=/DefaultEr
<error statusCode="404" redirect="FileNotFound.asp
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Your welcome.
David.
David.
ASKER
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.
I didn't realise that a URL required an extention.
ASKER