This is a discussion on "404 errors" within the ASP.NET Forum section. This forum, and the thread "404 errors are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
404 errors
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
404 errors
Hi,
Rob showed me a great technique using 404 error pages to execute asp pages. Using this method, it is possible to write SEO friendly URLs such as www.mysite.com/books to execute database driven pages which would normally look something like www.mysite.com/browse.asp?category=books. My problem is that I'm still on a shared server, and our host company want to charge us for setting up custom 404 pages. I'm wondering whether it is possible to set up something with asp.net to catch 404 errors. I've tried writing the following in to the web.config file, and this allows me to redirect to a custom 404 error page, but only if the page requested is a .aspx file. It won't redirect from a URL such as www.mysite.com/books (without .aspx on the end) <configuration> <system.web> <customErrors mode="On" defaultRedirect="/404page.asp"> <error statusCode="404" redirect="/404page.asp" /> </customErrors> </system.web> </configuration> Any help appreciated. |
|
|
|
#2
|
||||
|
||||
|
Re: 404 errors
Simon... you'll need the error document to be set in IIS to catch those errors without aspx extension.
I would just pay your host... you need to have that error document for what you want to do.
__________________
Click the 'Thanks!' button if this post has helped you Rob - Webforumz Founder
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#3
|
|||
|
|||
|
Re: 404 errors
ASP.NET will only catch errors within the application scope, which doesnt include classic asp pages! ...get a decent host
|
![]() |
| Tags |
| 404, errors |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Errors | Daniel | Webforumz Suggestions and Feedback | 4 | Jan 14th, 2008 00:17 |
| Two IE6 errors. | PicoDeath | Web Page Design | 7 | Dec 26th, 2007 17:42 |
| a few errors | lostyboy | Web Page Design | 8 | Oct 29th, 2007 19:45 |
| Two errors - Similar Errors too. | PicoDeath | Web Page Design | 6 | Jul 27th, 2007 18:06 |
| 404 Errors! | JacobHaug | Webforumz Cafe | 18 | Apr 11th, 2007 21:28 |