Howdy folks,
Does anyone know how to display a 404 page (or error page) for an invalid category URL?
I know how to do it for an invalid entry url by using
{exp:weblog:entries weblog="{my_weblog}" require_entry="yes"}and
{if no_results}
{redirect="404"}
{/if}but can’t figure it out for categories.
Here is an example of a correct URL (for my site):
http://www.example.com/go/articles/C4
Here is an example of an incorrect URL (notice the “C” is not capitalized:
http://www.example.com/go/articles/c4
When someone links to the incorrect URL, it winds up showing a ton of article links instead of just the articles in the C4 category.