404 errors

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > ASP.NET Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 21st, 2005, 10:08
Junior Member
Join Date: May 2005
Location: bath - england
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote

  #2 (permalink)  
Old Nov 21st, 2005, 12:08
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
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.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #3 (permalink)  
Old Nov 21st, 2005, 12:14
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 404 errors

ASP.NET will only catch errors within the application scope, which doesnt include classic asp pages! ...get a decent host
Reply With Quote
Reply

Tags
404, errors

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 00:17.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43