To Anyone who can help.
This is the issue. I've set the custom error tag and default page as follows:
Default Document is default.aspx
and CustomErrors is as follows:
<customErrors defaultRedirect="~/GenericError.htm" mode="RemoteOnly">
<error statusCode="404" redirect="~/404.htm"/>
</customErrors>
When I use the URL www.xyz.com/123/default.aspx and the page the customErrors works as it should. However, if I use the urlwww.xyz.com/123/ I get a generic 404 page. Why is it not going to the custom 404 error page on the latter URL when the default doc is default.aspx?