Hello,
I have an index template listing a bunch of posts in the normal way through the weblog entries tag. i.e.:
/template_group/To read an article in from this page, I point visitors to:
/template_group/article/artile_title_here/I also have paging enabled, so if a user wants to see older articles off the index page, they go to a URL like this:
/template_group/P10/etc.
The problem I am having is that a user visiting a URL like this:
/template_group/blajiophopaiheg/Is not shown a 404 page; rather, they are shown the index template. I have strict URLs enabled already and have read the articles telling me to use a combination of ‘require-entry=“yes”’ and the ‘if no results’ conditional. The problem is that from what I can tell I want to do something like this on my index template in /template_group/:
{if segment_2 != '' && segment_2 != 'article'}
{redirect="404"}
{if:else}
{exp:weblog:entries weblog="blog" limit="5" paginate="bottom"}
display code here, etc
{/if}The problem with this is that it breaks EE’s pagination, since the /P10/ part of the the URL is not ‘article’. Is there a way to both have pagination turned on, and show a 404 in this case? Is my only option to make something like /template_group/archive/ and force people who want to see older posts to look at that?
Thanks in advance.