Create a custom 404 page
- DelectablyYoursDecor
- Ensign (ENS)
- Posts: 9
- Joined: Fri Aug 08, 2008 8:39 am
- Location: Harrisburg, PA
- Contact:
Create a custom 404 page
Hi, I have been searching the boards for several days trying to find a solution for creating a custom 404 page. I'm assuming i must do from the base files manager but didn't know if there was a better way. I had moved my domain names from a different platform and there are many links still out there. Any assistance as to where to look would be greatly appreciated.
Thanks... Gail
http://www.Delectably-Yours.com
http://www.yourcabindecor.com
http://sellingbeyondebay.ning.com
Thanks... Gail
http://www.Delectably-Yours.com
http://www.yourcabindecor.com
http://sellingbeyondebay.ning.com
Re: Create a custom 404 page
In order to provide a error page for status code 404. First create a new page for example let say it FileNotFound.aspx and place it at root of the website. Now Edit the web.config file
and locate the customErrors tag and make it look like
where defaultRedirect="~/Error.aspx" it the default page you can create another page for this purpose and can provide its name here.
Also there is a topic about 301 redirects pages on the wiki here
http://wiki.ablecommerce.com/index.php/ ... leCommerce
Its not related to this post, just to let you know about the AbleCommerce WIKI
.
and locate the customErrors tag and make it look like
Code: Select all
<customErrors mode="On" defaultRedirect="~/Error.aspx">
<error statusCode="404" redirect="~/FileNotFound.aspx"/>
</customErrors>
Also there is a topic about 301 redirects pages on the wiki here
http://wiki.ablecommerce.com/index.php/ ... leCommerce
Its not related to this post, just to let you know about the AbleCommerce WIKI

Re: Create a custom 404 page
A WIKI topic created for 404 pages.
http://wiki.ablecommerce.com/index.php/ ... Error_Page
http://wiki.ablecommerce.com/index.php/ ... Error_Page
- DelectablyYoursDecor
- Ensign (ENS)
- Posts: 9
- Joined: Fri Aug 08, 2008 8:39 am
- Location: Harrisburg, PA
- Contact:
Re: Create a custom 404 page
Thanks Mazhar!
I will give this a try and post back how it works. I was tempted to just hire someone to do yet would like to know how to do more myself. Which could be scarry lol
I will give this a try and post back how it works. I was tempted to just hire someone to do yet would like to know how to do more myself. Which could be scarry lol

- DelectablyYoursDecor
- Ensign (ENS)
- Posts: 9
- Joined: Fri Aug 08, 2008 8:39 am
- Location: Harrisburg, PA
- Contact:
Re: Create a custom 404 page
Help... It didn't work, what am i missing?
I created the file at the root, changed the code for custom 404 in web.config to
<customErrors mode="On" defaultRedirect="~/ErrorPages/Default.aspx">
<error statusCode="404" redirect="~/ErrorPages/FileNotFound.aspx"/>
</customErrors>
and added the two pages exactly as you named. When attempting to see if the redirect works, say http://www.delectably-yours.com/website neither of the custom pages are redirecting. http://www.delectably-yours.com/ErrorPages/Default.aspx or http://www.delectably-yours.com/ErrorPa ... Found.aspx
Any help is appreciated!
I created the file at the root, changed the code for custom 404 in web.config to
<customErrors mode="On" defaultRedirect="~/ErrorPages/Default.aspx">
<error statusCode="404" redirect="~/ErrorPages/FileNotFound.aspx"/>
</customErrors>
and added the two pages exactly as you named. When attempting to see if the redirect works, say http://www.delectably-yours.com/website neither of the custom pages are redirecting. http://www.delectably-yours.com/ErrorPages/Default.aspx or http://www.delectably-yours.com/ErrorPa ... Found.aspx
Any help is appreciated!

Re: Create a custom 404 page
I could never get it to work when I put the custom erorrs mode like above:
<customErrors mode="On" defaultRedirect="~/Error.aspx">
<error statusCode="404" redirect="~/FileNotFound.aspx"/>
</customErrors>
I have this and it seems to work:
<customErrors mode="RemoteOnly" defaultRedirect="/404page.aspx"/>
It seems to catch the 404 errors with what I put above.
I could never get the error statusCode to work, any clues???
<customErrors mode="On" defaultRedirect="~/Error.aspx">
<error statusCode="404" redirect="~/FileNotFound.aspx"/>
</customErrors>
I have this and it seems to work:
<customErrors mode="RemoteOnly" defaultRedirect="/404page.aspx"/>
It seems to catch the 404 errors with what I put above.
I could never get the error statusCode to work, any clues???
Re: Create a custom 404 page
The above settings only works for an ASP resource request. For example if you provide some invalid URL for some ASPX page it work fine and redirect you to the desired page.<customErrors mode="On" defaultRedirect="~/Error.aspx">
<error statusCode="404" redirect="~/FileNotFound.aspx"/>
</customErrors>
For invalid URLs that just point to some directory for example
http://www.delectably-yours.com/website
or for the resources other then the ASPX pages like for HTML pages for example
http://www.delectably-yours.com/abcd.html
You have to configure the IIS custom error pages.
In order to do this create a HTML page with some suitable error message and then place it along with the other aspx error pages created in the above step. Now from the IIS open Properties dialog of your web directory and then select the Custom Errors tab. Now locate the entries there with error code 404. Edit the 404 entry and then browse your newly created HTML page there.