Hi,
I have successfully setup 404 page for root errors. For example, mysite.com/test-nonexist will be redirect to my 404 page mysite.com/four04.
However I can’t get this working for template group. For example, mysite.com/blog/test-nonexist will bring a 500 error for normal visitors/members, and a Database error for super admin. I use the template blog.group/index to serve blog pages such as mysite.com/blog/first-post.
FYI my current strict_url setting is false.
The methods I’ve tried:
1. Strict URL method. http://ellislab.com/forums/viewreply/870343/
I turned strict URL method on, and add {if segment_2 != ''}{redirect="404"}{/if} on the very top of blog.group/index template.
The result is, all my normal pages got redirected to correct 404 pages. So that’s not acceptable.
I just followed that method blindly but I think judging if segment_2 is blank is not applicable to my case as I do have valid segment_2 available. What I need to is to redirect to 404 when there is no valid url_title.
2. I tried to add {if no_results} {redirect="404"} {/if} within Channel Tags of blog/index template, under strict_url off or on. Not working. Still 500 or database error.
Could you give a hand?
Thanks!