Let’s make a couple of assumptions first:
- Strict URL setting is enabled.
- “Segment X” is blank/non-existant.
{exp:channel:entries channel="[CHANNEL]" dynamic="no" url_title="{segment_x}" require_entry="yes" limit="1"}
{if no_results}
{redirect="404"}
{/if}
{url_title}
{/exp:channel:entries}To my mind this should throw a 404, or at the very least just show a blank template. What in fact happens though, is it spits out the url_title of the last entry in [CHANNEL].
Now; is this expected behaviour (if so it doesn’t seem right), or do I have something weird going on. Checked on a few installs and it seems to behave the same way in all of them.
Having used EE for years on countless installs I can’t quite get my head round why I’m only noticing this now.