Register   Login
     
  Latest Posts  
RE: Notification on comment and multiple authors
by ba on 12/03/2008 8:54 PM
RE: How do I - templates
by cptkoi on 12/03/2008 8:19 PM
Notification on comment and multiple authors
by ba on 12/03/2008 8:14 PM
Private Messages 1.07 - Potential Display Name Bug
by blob150 on 12/03/2008 5:16 PM
Removal of "Actions" section...
by jlatulippe on 12/03/2008 5:08 PM
RE: MultiSelect Search on Multiple Checkbox
by smcculloch on 12/03/2008 3:46 PM
RE: Property Agent Latest Filter
by erikvb on 12/03/2008 3:45 PM
RE: Help! property type error
by smcculloch on 12/03/2008 3:44 PM
RE: Property Agent Latest Filter
by smcculloch on 12/03/2008 3:42 PM
RE: Set default value
by smcculloch on 12/03/2008 3:42 PM
  Forums  
Subject: How to redirect invalid pages to a "Page not Found" page.
Prev Next
You are not authorized to post a reply.

Author Messages
Jason KoskimakiUser is Offline
Registered Users
Nuke Wiz
Nuke Wiz
Posts:194

9/18/2006 12:41 PM  

With the urlrewrite module, at the end of the urlrewriter where it attempts to match on a tabname, if it fails to find a match it returns an asp.net error. I modified the code so if it does fail to find a match, then it goes to a hardcoded tabname of my choosing. I'll post the mod code here shortly.


On a tangent, what's nice about this is I am using it for my upcoming wiki module. This is fantastic for SEO and best possible URLs. So whenever my url string does not match, I simply send it to my wiki page (not released as this post) as shown below.

http://www.yapclub.com/dfw/sdfsd12d12df.aspx
http://www.yapclub.com/dfw/sdfsdffgsdfgsdfgdfgd/sdfsd12d12df.aspx
http://www.yapclub.com/dfw/sdfsdffgsdfgsdfgdfgd/dsdf/sdfsdf/sdfs111dsdfs/d12d12df.aspx

at which I can put any error message I want. In my case, I simply indicate that the wiki term was not found.

But when there is a match, my wiki will return a result:

http://www.yapclub.com/dfw/dallas-entertainment.aspx
http://www.yapclub.com/dfw/dallas-nightlife.aspx

So this way my site is super url optimized. :)

Jason


Social Networking Site for Young Professionals - My DNN Site w/ lots of Ventrian Modules
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12577


9/18/2006 3:27 PM  
Nice, by default, requests are sent to the default portal homepage if it's not found. (you must be requesting aspx/asmx files though)

Scott McCulloch
Site Administrator
You are not authorized to post a reply.
Forums > Projects > Friendly Urls > How to redirect invalid pages to a "Page not Found" page.



ActiveForums 3.7