PHONE 1300 138 046  Australian Owned and Operated  All prices in Australian Dollars


Portal Home > Knowledgebase > Windows clients > ASP.NET > Redirect old .asp or any non aspx pages using 404

Redirect old .asp or any non aspx pages using 404

Add this to the System Webserver section in the web.config file to handle any non .aspx pages


<httpErrors errorMode="Custom">

<remove statusCode="404" subStatusCode="-1" />

<error path="/" prefixLanguageFilePath="" responseMode="ExecuteURL" statusCode="404" />



Just keep in mind that the Error Path section can be set to whatever file you require the error to be redirected to.

error path="/"
error path="/errorpage.htm"
error path="/404.aspx"

etc etc.

Was this answer helpful?

Add to Favourites Add to Favourites Print this Article Print this Article

Also Read