J
Jon Spivey
Hi,
I've set up a custom error like this
<customErrors mode="On" defaultRedirect="ErrorPage.aspx">
<error statusCode="404" redirect="error404.aspx" />
</customErrors>
So requests for NoSuchPage.aspx are routed to error404.aspx. Good. But it
seems that requests for any other file extension (*.htm) or requests without
a filename (eg www.site.com/nosuchfolder) are routed to the default 404
page. Is this by design or is there something I need to modify to send all
bad requests to the custom error page?
Ideally i want users to be able to type www.site.com/productid (where
productid will always be a 10 digit number) send the request to
error404.aspx strip out the product id and redirect to
showproduct.aspx?id=productid but as it stands a request like that will go
to the default 404 page
Cheers,
Jon
I've set up a custom error like this
<customErrors mode="On" defaultRedirect="ErrorPage.aspx">
<error statusCode="404" redirect="error404.aspx" />
</customErrors>
So requests for NoSuchPage.aspx are routed to error404.aspx. Good. But it
seems that requests for any other file extension (*.htm) or requests without
a filename (eg www.site.com/nosuchfolder) are routed to the default 404
page. Is this by design or is there something I need to modify to send all
bad requests to the custom error page?
Ideally i want users to be able to type www.site.com/productid (where
productid will always be a 10 digit number) send the request to
error404.aspx strip out the product id and redirect to
showproduct.aspx?id=productid but as it stands a request like that will go
to the default 404 page
Cheers,
Jon